AloftWhy does Aloft use so much memory?
NOTE: anecdotal reports suggest that the new Ace3 version of Aloft (currently in test) uses "less memory".
a user recently asked:
i am not raiding these days, but with (literally) everything turned on (every module loaded, every feature enabled for display), my installation reports about 2.4Mb used, in a "high-density" setting (like Orgrimmar on a Friday night, etc). i run about 300 other addons, and Aloft ranks around 15th in terms of resource consumption (memory or CPU) even with all those nameplates showing.
in general, to reduce resource usage, the fewer nameplates that are visible, the better. for instance, if you are in town or grouped in a PvE DPS role, turn off all friendly nameplates (via keybindings or Aloft's "Show" options, etc). if you are grouped in a PvE healing role, turn off all hostile nameplates (via keybindings or Aloft's "Show" options).
you can also try disabling modules that you don't use (via Aloft's "Modules" options; uncheck what you don't want and then reload your UI).
if you want to benchmark addons, and find out what resources they are using, you can try installing OptionHouse. open the window (and leave it open as you play), select the "Performance" tab, and sort by the various columns along the top. sorting by memory-per-second will show you what addons are using memory habitually (you will see Aloft pop up near the top when a group of nameplates becomes visible), and so forth.
note that enabling CPU profiling in the WoW client really eats resources. unless you are on a moster machine, you probably won't be able to do anything complicated (like PvP) with this turned on, nor will you be able to run a lot of addons simultaneously (enable just a handful at a time for CPU profiling). as well, don't forget to turn this off when you are done!
follow-up, on some testing with OptionHouse, looking for memory leaks in Aloft:
parked at the fountain in Dalaran, with my mouse left out in the traffic path (effectively "mousing over" nameplates as people went back and forth). went off and did other things about the house and let it run.
tested this way for an hour with friendly nameplates on. tested for another hour with friendly nameplates off. every little while, i would turn off nameplates (with a keybinding), force garbage collection, and record Aloft's total memory usage from OptionHouse (then re-enable nameplates and run some more).
yes, assuming the numbers shown by OptionHouse are correct, there is a memory leak in Aloft. with nameplates visible, during my measurement, the leak totaled approximately 187Kb/hour (3.12k/minute). your mileage may vary, thought note that at this rate, a 4 hour session would leak about 750Kb (i.e. not even 1Mb), and all of this can be fixed at any time with a UI reload.
at some point i would be happy to work on some code preening, look at Aloft's table allocations, try to clean things up. especially after the Ace3 port is complete.
but while there are a whole variety of tools available that could reduce the level of effort required to find a memory leak in something "real" like a Java application, as far as i know, no tools of this sort exist for LUA inside a WoW client. everything would have to be done by inspection. that means the level of effort could be VERY LARGE.
i would have no ETA on fixing this (nor do i know if it even can be fixed).