Two addons showing high CPU usage, despite being small.
View Single Post
09-21-17, 04:55 PM
A Pyroguard Emberseer
Join Date: Sep 2007
When you hook a script like
, its cpu usage is not measured correctly, it combines every other piece of code that's run along with the hooked function and counts that as the cpu used.
If you created your own frame to run the same OnUpdate script from, it would likely report a lower cpu usage.
That being said, this is not a very efficient function, and not something that needs to be run OnUpdate.
While I doubt this is using enough cpu to have an impact on your frame rate, the only time this code needs to run is you first mouse over a unit and when their target changes, so it could be moved into a function called by the OnTooltipSetUnit event, and a frame with RegisterUnitEvent('UNIT_TARGET', 'mouseover') on it.
First what you should do is just disable these 2 addons and see if it makes any difference in your frame rate, that will tell you if the problem is elsewhere.
View Public Profile
Send a private message to semlar
Find More Posts by semlar