Jump to content


Methods for tracking down mods with memory leaks?

  • Please log in to reply
6 replies to this topic

#1 Andeh


    The Titleless

  • Members
  • 976 posts

Posted 31 January 2007 - 07:03 PM

I was wondering if there are some "best practices" for tracking down which mods have slow but steady memory leaks.

To elaborate, I run a rather large collection of addons, of which about 70% are Ace2, plus Nurfed and a couple others. When I first load or force a garbage collection, my memory usage is at around 19 MB. Over the course of playing for 15 minutes or so, this balloons up to 49 MB. While I think my machine can handle this fine, this sort of excessive increase in memory usage indicates (to me) poorly written code. I've tried using TekSupport to identify the culprit(s), but unfortunately it seems that often the latest build ends up locking your UI during combat (which is when the increases seem to occur). I managed to identify MetaHUD/DHUD as quite the little piggy and replaced it with my recoded Nurfed HUD, but the problem hasn't entirely gone away.

Any suggestions? I'd post a list of my current mods, but I'm at work right now.

Edit: I should mention that I have considered the "no-brainer" solution of individually disabling mods and reloading. The problem is that this leak seems to be occurring at a rather slow pace until I get into mass combat. I'll log in, putz around town for 5-10 minutes and only be at ~22 MB. I'll head into an instance, and 2 pulls in I'll be at 39 MB. It may very well come down to the trial and error method of detection, but I'd prefer to find a more elegant solution.

#2 Kalman


    Super Macho Man

  • Members
  • 8791 posts

Posted 31 January 2007 - 10:19 PM

There are some differences in the way 2.0 handles tables that cause memory utilization to be higher than would be observed previously. I don't know details, though. A more important stat, in some ways, than current memory in use is increase rate.
Melador> Incidentally, these last few pages are why people hate lawyers.
Viator> I really don't want to go all Kalman here.
Bury> Just imagine what the world would be like if you used your powers for good.

#3 Andeh


    The Titleless

  • Members
  • 976 posts

Posted 31 January 2007 - 11:48 PM

Ahhh, I figured that it could be something like that Kalman. Maybe that mods were not allowed to create new or destroy old tables as part of the "trusted interface" deal, and thus were just getting slightly larger each fight. Change in memory usage is quite small outside of combat, but climbs quickly to a certain size while in combat.

#4 Kaacee


    Don Flamenco

  • Members
  • 302 posts

Posted 31 January 2007 - 11:55 PM

On a related note, are any mods doing automatic garbage collection? I'm tired of clicking performancefu.

#5 Saroz


    Piston Honda

  • Members
  • 127 posts

Posted 01 February 2007 - 12:58 AM

Garbage collection in 2.0 is really screwed up, mine loads at 30 MiB used, I have it set to GC at 50MiB and everything freezes for 3-4 seconds when it does GC, it didn't do this before 2.0 at all.

Author of sRaidFrames: http://www.wowace.com/wiki/SRaidFrames
... aswell as: BadgeWatch, Aurora, FuBar_AlchemyFu, FuBar_CombatTimeFu & Memento Mori

#6 Wodahs


    Don Flamenco

  • Members
  • 431 posts

Posted 01 February 2007 - 01:12 AM

Garbage collection is different now. You wont see it hit untill the ui memory setting you make is reached. It defaults to 48 megs. Once you hit 48, it will do a gc, and your mem use will drop. Its not the same as it was. If you want, you can actually figure out how much mem you use, add 25%, and set that as your ui mem in the addons screen, and you will have more frequent, but shorter gc's.

#7 mutagen


    Don Flamenco

  • Members
  • 395 posts

Posted 01 February 2007 - 09:18 AM

I suspect (but don't know for sure) that some of the increasing memory usage is inherent in the way Lua handles variable allocation and is difficult to avoid. Certainly identifying the worst offenders and deciding if the addon is worth the memory leak would be useful.

KLHPerformanceMonitor might be useful for tracking down the memory hogs in your addon collection. TekSupport may also be useful.

My two (not-so-informed) sents.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users