View Single Post
03-21-08, 02:17 AM   #2
Shirik
Blasphemer!
Premium Member
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2007
Posts: 818
If you're referring to internet lag, then memory usage is not your problem. If you're referring to having a low FPS, then memory usage is not your problem.

In fact, no matter what, memory usage is not your problem in most cases.


You need to figure out what addon is taking the most CPU time and kill it. This is NOT typically the addon taking up the most memory (though it can be). Two equally well written algorithms will have a simple tradeoff: Memory vs Calculation Time. More memory usage typically translates into less CPU time. This goes doubly true for Lua.


Disable addons one at a time (or use a binary search pattern to isolate key offenders). Specifically look at the ones taking up the most CPU time if you have the capability of doing that (though this may prove ineffective if you are not triggering the component of the code causing the problem). Do NOT look at memory usage as anything other than something that may be suspicious. Memory usage rate is a good indicator usually, as it can indicate a poorly written addon if it is consuming memory rapidly (which will then translate into more GC action) but an addon can take up 500MB of memory and still run extremely fast (once it's initialized that 500MB of memory) if it doesn't keep churning it.

There is no "easy" way to do this. In general it's just guess and check, that's about it. Unfortunately there's nothing more you can do without an internal knowledge of Lua and the code of the addons.
__________________
たしかにひとつのじだいがおわるのお
ぼくはこのめでみたよ
だけどつぎがじぶんおばんだってことわ
しりたくなかったんだ
It's my turn next.

Shakespeare liked regexes too!
/(bb|[^b]{2})/
  Reply With Quote