Condition Memory Leak Commit, and Tax Prep
Hey Folks! Another split day today, with roughly half coding and half IRS fun.
The coding was wrapping-up the condition memory leaks, and I think that's in a pretty good place now. I found some additional leaks during battles (every move) and in expiring conditions (e.g. poison wasn't destroying itself when finished). Between these and the main changes from earlier this week, the number of conditions resident in memory grows asymptotically. I.e. slower the longer the game is running. And when the game finishes, they all get cleaned up except for the template copies that are used to derive per-creature copies.
Put another way, each new game in the old system generated 150+ new conditions in memory, just by visiting the skill screen and quitting. And battles could inflate that by another 5-15 per turn, permanently.
The new system generates about 80-100 the first time the game reaches the skill screen (30-50% improvement). Battles produce almost nothing each turn (99% improvement). And quitting the game drops it back down to 50-80.
Tiago's got the code now, and hopefully his tests will show an additional decrease in memory bloat per turn and per game!
In the world of taxes, I think I've finally worked out what I need to pay myself in 2016, and importantly, how much tax to withhold. I ended up having to almost file my 2016 taxes to get an estimate, which is annoying. But as usual, I learned a few things about taxes in the process.
The good news is that I think the tax burden now that I'm in the US is lower than when I was in Canada. I guess the question then becomes: is it enough to make up for the drastic increase in cost of living? After all, I'm now paying for my family's health insurance (and copay). And rent is almost 300% my old place. We shall see!
Anyway, I've got the numbers worked out, and I think I'll sleep on it before committing it to the bank account. Never know if I'll think of something at 3am that I missed the first time :)
Have a good night, all!