Jump to content
SubSpace Forum Network

Recommended Posts

Posted

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 blum.gif

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 blum.gif

 

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

Posted

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 blum.gif

 

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.

  • 1 month later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...