Archived

This topic is now archived and is closed to further replies.

Andeh

Methods for tracking down mods with memory leaks?

7 posts in this topic

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.