Improving script memory usage

Plombo

OpenBOR Developer
Staff member
Hi.  Just a heads up to let everyone know that I'm finally working on OpenBOR again.  I ran a test yesterday, and found that about 50% of instructions in most compiled scripts are no-ops that just indicate things to the compiler and do nothing during execution.

I'm planning to try implementing an optimization to remove these instructions after compilation, which should be a major improvement to script memory usage.  It's nowhere near as simple as it sounds, though, so no promises about if or when it'll be done. :)
 
Long time no see and back with good news more memory is always a good thing look forward to this update.
 
Thanks, everyone!

It's not what I was talking about earlier, but I stumbled across a different and much easier optimization opportunity while I was looking through the code, and committed it.  So even without the larger changes I'm working on, script memory usage should be reduced by maybe 3-6% already by r4077. :)

Though that probably won't make a big difference for most people, since script is a fairly small percentage of total memory usage in most mods.
 
Great to see you again, Plombo. ;D It's been so long. It would be great to see the memory being improved in OpenBOR.
 
I think I've got it working now.  I'm going to test some more, then I might make a thread asking people to test the memory savings and confirm I didn't break anything. :)
 
WB Plombo!

I've been using build 4077 without any problems.

What's the best way to test the memory savings?  I'm just going by what is loaded to memory on first run.
 
Back
Top Bottom