addon draining memory
jekoder opened this issue ยท 11 comments
https://cdn.discordapp.com/attachments/218084462523711489/404112379643953172/unknown.png
artifact data keeps draining memory when enabled
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
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.
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)?
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.
so currently a easy way to reproduce it is to
-
Log in a 110 death knight switch specialisation to blood and use https://wago.io/NkaTBpcPW this death strike weakaura
with lib enabled. -
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
I forward this to the author and also changed code myself, this does solve memory consumption problem, now LAB is only using 154kb
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.