Last-Minute Memleak Work, and Happy Holidays!
Hey Folks! Last day at the office before taking a week off, so what better way to spend it than working on memory leaks?
Actually, I did also finally pay myself for 2016 this morning. So that's kind of exciting :)
The memory leak situation has regressed. Tiago reports that the memory usage is actually worse after my changes than before. Oof!
This isn't necessarily unheard of. Often, sweeping changes like this miss something that can cause things to be worse, and fixing it pushes it forward to a net gain. So we're both going to look into it a bit to see if that might be the case. Briefly, we also considered that it might be a front-loaded memory cost. I.e. it might use a lot of memory up front, but less as time goes on. (Which would still be better than linearly using more memory each turn.)
Alas, memory crossed the critical high-water point during a fairly brief test, so I think we still have work to do.
So I started looking into why. I managed to stumble across some new bugs in the process, but no smoking guns yet.
One suspicious thing is that I seem to be getting a lot of un-destroyed Creatures, ItemInstances, PlayerConditions, and Encounters. The items and conditions especially are weird, as those are the very things I thought I had finally under control. Did something regress? Are the reports wrong? Is this new memory inflation because of the code we added to monitor things? (E.g. the report keeping a copy of everything, even though the game destroyed it?)
Or maybe the creatures, which host a long list of items and conditions each, are the root? Will destroying those help?
One thing's for sure: I made just about zero progress taming memory today. Bug fixes, a couple. But I can't seem to get ahold of memory right now. I guess that means it's time for a vacation :)
And on that note, Happy Holidays, everyone!
I'll be taking next week off, and therefore pretty quiet on the internet. No work posts each day, etc. But I'll be back on the 3rd, and hopefully, back to business as usual.
Visit loved ones.
Eat and drink yourselves silly, if that's your thing.
And I'll see y'all in the new year!