beyzend wrote:
that's cool. Thanks for the hints. I think I will just implement this myself for now and if you like it we want merge it back.
Yep, sounds good. For now I will continue to make no promises about thread safety and will leave it to user code to enforce. Or, you can add your own thread safety to PolyVox which is what you are suggesting. At some point in the future I probably will make PolyVox thread safe, possibly based on your changes.
beyzend wrote:
What sort of dimensions do you think the large volume supports now with the new compression scheme. I need more than 1024 x 1024. Another reason I use threads is so I have background loading, improving interactivity.
Your data is very simple (almost a heightmap, despite being in a volume). This will compress very well. I just did a test of 2D perlin terrain in a 8192x8192x256 volume and it used about 50Mb. This is a pretty big volume, though not quite infinite

It's a step in the right direction though - now that there are timestamps and an LRU scheme it should be possible to extend this mechanism to cache the really old blocks to disk and free memory. Essentially it's then a three level hierarchy - uncompressed blocks (fastest), compressed blocks, and blocks on disk (slowest). We'll get there in time

beyzend wrote:
Another thing I may try is to go back to one terrain chunk one volume and not worry about borders since I'm fill-rate bound. This would still allow for threaded generation and having the new compression scheme. Actually, I will try this first.
Sure, if you are sticking with multiple volumes then you'll probably want to reduce the block cache size. It defualts to 256 which is probably more than you need and gives an overhead of several megabytes per volume. Use setBlockCacheSize() to change this.
Anyway, there's no urgency to merge this stuff to the trunk. I'll see how it goes with your project, make some tweaks myself, and merge in a week or two.