MovingBlocks/Terasology — pull request #437 by mbrotz (2013-02-09 10:31:56+00:00)
Title: Important issue with LocalChunkProvider

Hi

I have identified a severe issue with LocalChunkProvider. The LocalChunkProvider systematically generates multiple chunks for every chunk position. It actually generates twice as much chunks than necessary and sometimes it keeps generating the same chunk over and over again. And when you move around and new chunks are generated, it generates some chunks more than two times, sometimes 3, 4, 5 times. All the redundant chunks are just thrown away and garbage collected.

This is a very simple fix for that issue.

I notice a signifficant improvement on my old and slow notebook when i create a new world and when i move around. The world is generated much faster and it feels more responsive when i move around and new chunks are generated.

It's difficult to measure the improvement. In my branch stackable-chunks i have implemented a chunk monitor where i can watch the chunks being generated. I can clearly see the difference there.

On my machine, the generation of the world feels up to twice as fast as before!