pioneerspacesim/pioneer — pull request #2582 by fluffyfreak (2013-12-21 15:10:48+00:00)
Title: Sector cache

# Description:
This is an optimisation based on the observation that we regularly and repeatedly generate the same sectors of the galaxy sometimes 10's of thousands of times in a single frame. We do this for a lot of reasons but since we want them so often it seems only sensible to keep them around for a while and use them repeatedly.

@robn very kindly pulled this out of my original very messy PR #2541 and then I've extended the uses of it.

Hopefully everyone should notice the benefits of it and there should be far fewer, if any, long stalls when NPC ships arrive/leave space stations etc.

Andy