It also begs the question of why it's suddenly in vogue to misuse 'begs the question' in various KoL forums
Haha, yeah I guess I never really thought about context,
see also.
In my unscientific tests, I noticed about a 2.5-3.0 second delay to open the buff window upon a fresh start of mafia. Subsequent openings are instant, thanks to the caching mentioned above.
This has always been the behavior. No new cache method has been implemented.
Are there any nifty memory-tracing tools for Java that might be helpful in mapping out stray objects that should be getting cleaned up?
Yes, you can use jmap to dump the memory and then jhat to interpret the dump. It can be a bit overwhelming though, especially if you're not familiar with the components of the project.
After Jason's improvements, it's only using 5-6 MB on my system. Is it still using 12 MB on your system?
Tested in r7643. Noticed the memory did jump up by 12mb once the GUI had fully loaded. Tested again in r7647 and it used only 6mb of RAM (nice improvement).
The behavior still seems a bit odd though. If I open mafia and let it run for about a minute to settle then force garbage collection, it will be using roughly 30mb of RAM, +/-2mb. If I then open the Item Manager, that will increase by around 3mb. Now if I close the item manager, wait a few moments and force garbage collection, about 2mb will be freed.
Now if I open Purchase Buffs, the memory will go up by about 6mb, however, if I close the Purchase Buff UI, wait a few moments, then force garbage collection, only about 500k will be freed.
So what's with the higher memory usage? Is it the XML file data being kept in memory? Or is it something funky in the UI that uses more memory than the Item Manager?
The extra 6-7mb free from the improvements can go a long way, but I still think something is a bit funny with the buff purchasing window.