AdiButtonAuras

AdiButtonAuras

404k Downloads

Possible bad interaction caused by new the Torghast Empowerment Action Button

arcadepro opened this issue ยท 12 comments

commented

When you kill enough mobs in Torghast (9.1) a new extra action button appears. With Adibuttonauras running this button seems to trigger a pretty horrendous performance issue. It causes the whole game to stutter to an almost unplayable state.

Here is a picture of the /etrace. Not sure how helpful it is.
https://imgur.com/a/8BuqbKY

The stutter issue exists in the base client but to much less disruptive degree. Blizz are obviously doing something stupid with this button's update but ABA amplifies the issue and makes it way worse.

You can test this by completing a Torghast wing with a full empowerment bar. It won't deplete when the end boss is killed so you can observe the bug indefinitely.

commented

I have the same issue.

commented

I can confirm this.

Here's a clip I just recorded of me in a run of Torghast in Layer 1, with only two addons: AdiButtonAuras and Bartender 4. You can easily imagine how horrible things become in Layer 11 or 12. Oh, yeah, and I'm playing in French for unspeakable reasons.
๐Ÿ˜›

At 3:30 in the video, I burst on the last boss and start running around to show the sudden difference in performance.
https://www.youtube.com/watch?v=0oc-jijSboQ

commented

Confirming, I have this issue also.

commented

After disabling every addon and only running this plus a bar mod, I can also confirm that ABA is causing performance issues. For me I get this stutter everywhere, but torghast is by far the worst. My game will stutter and then wow will just flat out stop responding and I will need to end task and reboot wow. With ABA disabled my game client is smooth, and after doing 5 back to back torg runs, I have no performance hit.

commented

So I know (some of?) what this is, but not how to fix it.

One problem is LibSpellbook-1.0, because the game is pulsing SPELLS_CHANGED for some reason. LibSpellbook-1.0 must have a bug or leak that normally doesn't come up because SPELLS_CHANGED is so rare.

[Edit: deleted bad comment about hook function]

Overall at this stutter time the game is pulsing all of these in a row multiple times per second:

ACTIONBAR_UPDATE_COOLDOWN
ACTIONBAR_UPDATE_STATE
SPELL_UPDATE_COOLDOWN (x2)
SPELL_ACTIVATION_OVERLAY_GLOW_SHOW
BAG_UPDATE_COOLDOWN (x3)
SPELL_UPDATE_ICON
SPELLS_CHANGED

Also in many cases along with all of these also UNIT_SPELLCAST_SUCCEEDED for "player" with relevant blessing/torment spells.

commented

Confirmed that you don't need AdiButtonAuras to trigger this issue, having (and loading) LibSpellbook-1.0 by itself causes bad stuttering.

commented

So in general LibSpellbook-1.0 is a terrible idea - maintaining a heap of data about spells triggered off events, whether you are using it or not. AdiButtonAuras should probably be rewritten not to use it. But we know that won't happen.

But, LibSpellbook-1.0 also has a serious bug, fix below. This should be enough to get most people working acceptably, even if LibSpellbook-1.0 is still a massive resource hog inside Torghast.

Edit the file: AdiButtonAuras/libs/LibSpellbook-1.0/general.lua

Look for the line at the start of the ScanUpgrades function that reads

local upgrades = spellUpgrades[playerClass][5] or {}

and change it to

local upgrades = CopyTable(spellUpgrades[playerClass][5] or {})

commented

I added this fix and it seems to have improved the performance in the open world, it still has stutter here and there but much less noticeable. In torghast it seems better as well, until the ability to use your empowerment button spawns. If I don't use it right away, my game will either stutter again, or wow will stop responding altogether. So the issue def still persists, but it's much more workable. Appreciate the work you put in, thank you.

commented

I merged AdiAddons/LibSpellbook-1.0#11 and fixed another probably related issue which made ABA re-evaluate active rules. I suppose this would ease it quite a bit but would like to have a confirmation before pushing a new release.

In order to test this you could just clone the LibSpellbook-1.0 repo into your Interface folder, LibStub will take care to load the latest version, which should be the cloned one.

So in general LibSpellbook-1.0 is a terrible idea - maintaining a heap of data about spells triggered off events, whether you are using it or not. AdiButtonAuras should probably be rewritten not to use it. But we know that won't happen.

Allow me to kindly disagree. See #391 (comment)

Confirmed that you don't need AdiButtonAuras to trigger this issue, having (and loading) LibSpellbook-1.0 by itself causes bad stuttering.

I cannot reproduce this and the above fix will not help with that. Where do you have this stuttering? How can I repro?

commented

For myself, the stuttering happens in the open world, but its quite faint. You'll see micro stutter, almost like terrain collision when running along, say in Korthia doing dailies or what have you. In Torghast my game gradually amplifies this, up until the point the empowered button spawns. When it does, if I leave it on my screen un-used, my game will stutter severely and eventually wow will stop responding altogether. If I use the empowered button right away, the stutter is night and day, it disappears almost instantly.

commented

Thanks for the fix, much appreciated.

commented

This should be addressed in the latest release (9.1.0). The main reason for it was that spells cache clean-up was wrongly reported by LibSpellbook which triggered a full re-evaluation of rules in ABA. This paired with the significant amount of SPELLS_CHANGED events issued by the game when the empowerment bar is beyond its threshold lead to extreme CPU usage by ABA. Please excuse the inconvinience it has caused and thanks a lot for the help tracking it down.