pioneerspacesim/pioneer — pull request #1020 by Luomu (2012-02-25 22:34:20+00:00)
Title: Optimize background

Said by @Zordey on SSC:

>Ok, another new (i think) issue is that hyperspace jumps now take 15+ mins.
>
>frame rate drops to 1fps (indicated but actually much less), 100% CPU usage and swap file usage climbs to 2gb (max on my machine)

Hyperspace animation data was allocated every frame. Turns out there was also a memory leak, which was probably the main cause of stuttering ;) So I fixed that, and the data is also now only allocated when the hyperspace animation starts.

Furthermore, I reduced the number of stars from 65536 to 10000. This is how many there were before (if they were all white):

Which seems like a bit much. A lot of them were just too dark to be visible, so I changed the brightness randomization again, and then the star amount could be safely reduced. I think it looks just as good as before, but please check that the effect looks correct to you too.