World folder
#11
Phew.. I just did a whole overhaul on the way stuff is saved, and it's not even done yet.

I went with the same kind of approach Notch did, now multiple chunks are saved in one file, and it's compressed! It's tinyBig Grin

I created a test case:

Old format:
  • 325 files
  • 25,3 MB

New format:
  • 6 files
  • 783 KB

The new format stores a maximum of 1024 chunks ( 32 by 32 ) chunks in one file. Chunks are intelligently cached in compressed form in memory and uncompressed when they are needed which keeps the RAM usage really low (expect 2~4kb per unused chunk, ~80kb per used chunk). In addition to that, it's REALLY fast!Big Grin which is pretty cool.

Data is compressed with zlib which (I think) comes with it's own corruption detection stuff, so I no longer have to check that manuallyBig Grin


PS:
Another awesome thing is that your old data is converted to the new data ON THE FLYTongue So you have to do nothing, and you won't even notice it!
Reply
Thanks given by:
#12
I still want the ability to convert my minecraft single player worlds into MCServer worlds - there's just stuff I can't be bothered building again.

Even if it was a really inneficient converter that I had to leave running for 5 hours that'd be better than nothing :S
Reply
Thanks given by:
#13
(05-06-2011, 02:22 AM)FakeTruth Wrote: Phew.. I just did a whole overhaul on the way stuff is saved, and it's not even done yet.

I went with the same kind of approach Notch did, now multiple chunks are saved in one file, and it's compressed! It's tinyBig Grin

I created a test case:

Old format:
  • 325 files
  • 25,3 MB

New format:
  • 6 files
  • 783 KB

The new format stores a maximum of 1024 chunks ( 32 by 32 ) chunks in one file. Chunks are intelligently cached in compressed form in memory and uncompressed when they are needed which keeps the RAM usage really low (expect 2~4kb per unused chunk, ~80kb per used chunk). In addition to that, it's REALLY fast!Big Grin which is pretty cool.

Data is compressed with zlib which (I think) comes with it's own corruption detection stuff, so I no longer have to check that manuallyBig Grin


PS:
Another awesome thing is that your old data is converted to the new data ON THE FLYTongue So you have to do nothing, and you won't even notice it!

That sounds epic Smile))
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)