This is an addon to compare the memory and CPU usage of your addons.
How to Use
To summon or dismiss the window:
• /addonusage
• or set up a key binding in the default key binding interface
A window will list each loaded addon alongside its memory usage, and CPU usage if enabled.
• Column headers across the top can be clicked to sort by that column.
• The total memory and CPU usage will be displayed at the bottom of their respective columns.
• The window can be resized by the grip in the lower right corner.
In the lower left is a "CPU Usage" checkbox. Enabling this will turn on CPU profiling and display CPU times for each addon alongside their memory usage.
Beside the checkbox are three buttons, from left to right:
• Reset: This will clean up memory and reset CPU usage tracking.
• Update: This will update usage information.
• Continuous Update: This acts as a Pause/Play button to automatically update usage every second.
Why to Use
If you're thinking of downloading this addon, you're probably trying to optimize your UI so it can run as efficiently as possible or you're experiencing fps loss and suspect an addon may be the cause.
I recommend, for the most part, ignoring the memory usage of addons unless you're on a low-end system. Even garbage memory creation (the memory creep active addons appear to be doing) is not really an issue if it happens slowly. If you watch closely you'll see the addons' memory usage reset back after a while. WoW's Lua implementation does this over time in a low-impact cleanup.
Instead you'll want to focus on the CPU usage of your addons. Everything your addons do, everything, happens between the frames rendered on your screen. The more work your addons are doing, the longer the game waits to render your next frame and your fps drops.
The best way to troubleshoot fps issues is to turn on CPU monitoring and go out and play. You can forget about it until later in the session. Bring up the window and see how they all behaved.
If you're experiencing a noticable fps drop in certain situations, like in one encounter in a raid (which is almost always graphic related and not addon related), or flying around looking at the map, or doing tradeskills, etc, you can hit Reset before you know the fps drop is about to hit. Then look for any abnormally high CPU usage among your addons.
The reason CPU monitoring isn't on by default is because the act of monitoring how much work your addons are doing causes a bit more work that will slow you down even more unless you're on a high end system or have few addons. You should only have CPU monitoring enabled when you're testing.
That said, some things to consider when looking at the numbers:
• The percentages are all relative to each other. If you're spending 80% of your time making bandages, 10% of your time chatting and 10% of your time raiding, expect your tradeskill/inventory addons to share a bulk of the usage. If you notice in this situation a map addon taking up an abnormally huge share of CPU time, then that's something to investigate.
• CPU usage is measured in milliseconds per second. The milliseconds of CPU time that the addon has accumulated divided by how long since CPU usage was last reset, or just after login if there has been no reset.
• CPU usage per addon is taken from the in-game API and does not represent the whole story. It's possible for an addon to get some of its work blamed on another if libraries are involved, or it may get a lot of work to go unnoticed. Use these numbers as a guide only.
• Remember to turn off CPU monitoring when you're done testing!
Hey, when i activate the CPU Usage, its lagging every second.
Is this "normal"?
Edit: Its not when i activate CPU Usage; its when i klick the "Play" button to start updating continous.
Deleted
In reply to armonth:
Yes I'm happy to report it works in both classic and TBC classic as well.
Though unfortunately you have to load out of date addons to get this to work in classic and TBC classic. I'm hoping Blizzard implements a way for us to make an addon "up to date" with multiple versions of WoW.
Since this addon is probably used by those suffering problems with their UI, I may split it out to separate versions so it can be "up to date" without requiring out-of-date addons loaded.
Deleted
Hi there...
I've been having some SIGNIFICANT troubles with FPS drops while raiding.
Between WoW and discord, I'm pinning 100%
I've installed this addon and it provides awesome information, but I'm struggling to correlate this to what I'm seeing in the Windows Task Manager.
If this tool says a particular addon is using 400ms/s (which I interpret as 400ms/1000ms or 40% of total cycles)...
...what is this 40% of?
40% of a single core?
40% of total WoW's CPU Usage (per Task Manager)
40% of total available CPU Cores?
for reference I'm running a QuadCore+HyperThreading (4c/8t) CPU.
Thanks in advance.
In reply to karpana:
You could have a 25 trillion core computer and all addons and Blizzard lua-based UI together would use 1 of those at most. The lua environment is single threaded. The number of cores can be completely removed from any discussion.
I think any relationship to task manager can be removed from the discussion too. There's a loose correlation there since the WoW client itself is doing a lot of work and the addon environment is so tightly sandboxed that there's no way to even tell if you're on a Windows machine or a Mac from within an addon. (Maybe...now that I think of it, that specific distinction could be an API Blizzard provided.)
The times are taken from https://wow.gamepedia.com/API_GetAddOnCPUUsage. The specific timing can be used as a comparison to times you've seen in the past or against other addons. So if your addons have been using around 1ms/s total and suddenly they're using 10ms/s you know there's been a significant change. It could be perfectly normal. Idling in Oribos will use significantly less addon usage than a 40-man raid with a lot of adds. Or if all your addons are at 0.1ms/s except one is at 5ms/s, then the latter is doing a lot of stuff. And depending on the addons you use and what you're doing this can be okay.
There are other ways to look at usage, notably https://wow.gamepedia.com/API_GetFrameCPUUsage and such. And the above cpu usage doesn't take into WoW's function calls either. And you'll note that Blizzard's lua-based UI is not included either.
So I'd probably not try to associate 400ms/s to being 40% of cpu usage but instead as a relative comparison against other addons.
Edit: Wrong addon page, can't delete. Sorry.
Still works great, might want to update ToC :)
Hello,
just wanted to mention that each time i "check/uncheck" the CPU profiling option and reload UI, i get DC'd .... lol, after the relog it works fine and as intended, but it would be nice to see why it does that each time :p
and some of the bellow suggestions to improve AU would be a good upgrade :D
ty.
I like the sorting function of the window to sort by ms/s values. Unfortunately the values seem to be rather useless, because they are derived from long-time averages that either start ridiculously high (reset inside the addon) or at zero (ResetCPUUsage). In both cases the measured values hardly ever reach the true values, especially because they are not calculated on a "per second" basis as they should.
Two options I would like to see:
1. Option to display total CPU usage sum (ms accumulated), just like most other addons in this category offer.
2. Option to turn off memory display and thus keep WoW from experiencing short lags every second due to UpdateAddOnMemoryUsage being invoked.
Thanks and regards!
In reply to Forge_User_46596386:
WTB a minimap button and the ability to be skinned ala elvui ftw :)
ty for the work on the addon nonetheless :)
Would this be possible to implement?
Say I want to highlight one addon to track it easier, make it possible to click (toggle) to highlight the whole row like this or the text and remember it until manually toggled off.
In reply to Yuyuli:
Getting an error when trying to use this in 7.2 :
Thanks for the report. I'll have a fix up soon.
Thank you for this great addon! It is so difficult to find a clean and easy-to-use addon for a task like this. Please keep updating this useful piece of work, because I am very happy to be able to use it!
Hi,
Thank you for the update!
Tried using it just now again. If I try to open it during combat (to see what addon is hogging resources during combat), the window comes up saying just 'addon' for all the first columns and 100% on the last column, and the following errors appear:
1.
1x AddonUsage\AddonUsage-2.0.10.lua:131: script ran too long
AddonUsage\AddonUsage-2.0.10.lua:131: in function `?'
FrameXML\ChatFrame.lua:4385: in function `ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4053: in function `ChatEdit_SendText'
FrameXML\ChatFrame.lua:4089: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>
Locals:
2.
3x AddonUsage\AddonUsage-2.0.10.lua:49: script ran too long
AddonUsage\AddonUsage-2.0.10.lua:49: in function `BuildList'
[string "*:OnShow"]:1: in function <[string "*:OnShow"]:1>
[C]: in function `SetShown'
AddonUsage\AddonUsage-2.0.10.lua:131: in function `?'
FrameXML\ChatFrame.lua:4385: in function `ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4053: in function `ChatEdit_SendText'
FrameXML\ChatFrame.lua:4089: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>
Locals:
3.
17x AddonUsage\AddonUsage-2.0.10.lua:147: bad argument #2 to 'format' (number expected, got nil)
[C]: in function `format'
AddonUsage\AddonUsage-2.0.10.lua:147: in function `update'
SharedXML\HybridScrollFrame.lua:190: in function `HybridScrollFrame_SetOffset'
SharedXML\HybridScrollFrame.lua:30: in function <SharedXML\HybridScrollFrame.lua:29>
Locals:
After combat, though, the window updates to show the correct info.
Thanks for the report. I'll look into this.
Thanks for a great addon, compact size and easy to use. A+