LibArtifactData-1.0

206k Downloads

addon draining memory

jekoder opened this issue ยท 11 comments

commented
commented

lad dh - on a Demon Hunter
lad hunter - on a Hunter
lad monk - on a Monk

GetAddOnMemoryUsage

commented

https://cdn.discordapp.com/attachments/388998464144539650/404606047446237186/unknown.png
this is on my dk, but i think a it's my deathstrike weakaura causing the problem

image

commented

Could you run /dump LibStub('LibArtifactData-1.0') in-game and post a screenshot of it here? It should look like this:
wowscrnshot_012118_141721
I think someone is storing their stuff on the LAD object.

commented

alt text

commented

It would be nice if you could help me narrow it down. A list of addons you have installed that use LAD would be helpful. You could use a tool like grepWin to search for those.
grepwin lad
Use *.toc as a file names match like in the screenshot.

Also any WeakAuras scripts that use LAD would be interesting.

Apart from that, some steps to reproduce are needed. Is the memory consumption that high right after you login or does it take some time? Do I have to do something special to reproduce it (join a raid, login on a certain class, wait for X minutes with addon XYZ installed)?

commented

TBH, I don't know what might be causing it then, it shouldn't exceed 150-200 KB in memory use. Sadly I cannot solve this as long as I cannot reproduce your reported case.

commented

so currently a easy way to reproduce it is to

  1. Log in a 110 death knight switch specialisation to blood and use https://wago.io/NkaTBpcPW this death strike weakaura
    with lib enabled.

  2. use elvui's system datatext to track memory usage.
    then you should see the memory usage rise very rapidly about 2mb/s

and u don't to be in party or raid

the memory issue also happens to the https://wago.io/NkogH0_D- which is from same author
i also contact the author of weakaura but haven't heard anything back yet

commented

alt text

commented

I forward this to the author and also changed code myself, this does solve memory consumption problem, now LAB is only using 154kb

commented

Could you tell the WA guy to use :IterateTraits instead of :GetArtifactTraits and see if this helps with the problem?

The reason is s/he calls :GetArtifactTraits on every frame instead of using CallbackHandler to pull it only when changes occur. :GetArtifactTraits returns a reference to a copy of the traits table rather than providing direct access to the data, thus the memory consumption is blamed on LAD. I should have done it by using a read-only table instead.

I won't have time for this today, but I'll make some changes to LAD to alleviate this behavior. Can't be done in Lua 5.1, using the iterator is the only solution for now.

commented

You might not want to see the CPU load of this script btw. The author basically ignored everything that's good practice.