Description
This is only a hack of UIMem that you can find at
http://www.curse-gaming.com/mod.php?addid=633
Changes I have made:
* tooltip displays information about difference in memory now, and last sec (averaged over 5 secs), that way you can track how much mem all those plugins are allocating (and when).
* normal window of UIMem no longer displays current memory usage - now it displays the same information that was added to tooltip (average of memory allocation in last 5 secs)
* uimax is set to garbage collector threshold (it means that you will see UIMem window colour in regards to how long it will take for GC to run - when it's red, GC will run very soon, when it's green you still have a lot of time until GC is run).
Ok, why those changes? I hope a lot of people will go hunting all those plugins that allocate too much memory (Telo's InfoBar comes to mind as main offender, but please check my comment at http://www.curse-gaming.com/mod.php?addid=427&page=43#post21430 for longer list).
As soon as Snake incorporates some of those changes into his UIMem I will remove this plugin modification from here.
For all those that don't know what Garbage Collector is.
In scripting languages you usually don't have to worry about memory allocation and deallocation. It's taken care of by the language itself. Lua is such a language. There is no need for memory management. If something is no longer used - Lua takes care of deallocating memory used by that thing. This mechanism is called Garbage Collection - since what is no longer needed is just garbage. But running GC is not free - it needs to scan all the memory some program have allocated and check if it is still useful or not. This process takes time. That's why GC is not run constantly - it only runs from time to time.
How does it know when to do it's job? :)
There is a setting called GC Threshold. When current memory usage is higher than GC Threshold than Garbage Collector is run.
In WoW when that happens you see a slight pause of your game (on my computer (athlon 2200+) it's between half a sec and 1 sec). Obviously if you would have to live with that pause all the time (eg. it would happen every 10 secs) it would be bad.
When you have no plugins installed that pause never happens, since there is no memory being allocated and GC Threshold is never reached.
If you have a lot of plugins, especially some badly written, it can be run as often as every 10 secs.
So how can you help?
Find plugins that allocate a lot of memory per sec (you can do it using this plugin). Just start your WoW with only this plugin, Fetch, and some other plugin you would like to check.
Do some stuff in game while observing UIMem window.
If it displays 0 - everything is more than fine.
When it displays < 1 you can live with that :)
Everything more than 1 is too much for constantly running plugins (but it OK if you have just made some action like opened you bag, and you plugin is for example scanning what's inside)
So... 0 is always good.
Almost any value is good if it happens rarely.
For constantly running plugins (bars, clocks etc.) everything larger than 1 is bad.
NOTE: if you are going to play around with your addons like that (enable/disable them), make sure to back up your SavedVariables.lua file first. When you disable addon it’s configuration is no longer saved.
Ok I hope that helps, Happy Hunting :)


