Samapico Posted August 3, 2008 Report Posted August 3, 2008 I made some improvements for saving and loading ASSS regions. The opening speed was already improved in the latest release, due to the new byte array. I'm using Hyperspace's omega11.lvl file as reference... that map has like 50 huge regions Opening it takes me 3.7s This morning, saving it took me like 32s I just made that much quicker... saves in 11s now. Still long, but can't say a 66% decrease is negligeable Basically it was using very inneficient dynamically-resized arrays... Everytime it had to add something in the array, it had to resize it. Resizing an array while preserving the data (Redim preserve in VB) takes a significant time, because it actually has to allocate a whole new larger memory block, then move the stuff there. Now it resizes the array once every 256 operations or something like that. Some other minor tweaks made it gain a bit of speed. Yeah, that was made long ago, I used to make dumb code
Dr Brain Posted August 5, 2008 Report Posted August 5, 2008 Make sure it doesn't remove custom region chunks (I'm still using 3.1.10, so maybe it's already fixed?).
Samapico Posted August 5, 2008 Author Report Posted August 5, 2008 hmmmmm... it should keep custom chunks, but not sure about custom REGION chunks... Nor have I tested much either way. The order of the chunks does not matter, right? For region custom chunks, they'd just have to be within the region's chunk? So I could just store the unknown chunks completly in a byte array, and dump it back in there when saving... I think that's what it does for custom "global" chunks, never really tested if it actually worked And yeah, get the newest version already :/I suggest getting it off dcme.sscentral.com though, the auto-update seemed a bit buggy when jumping from 3.1.10 to the current version.
Samapico Posted September 28, 2008 Author Report Posted September 28, 2008 Custom chunks should now work, Region loading is barely noticeable in the loading time, Rock on
Recommended Posts