New UNIT_AURA Processing Optimizations

We recently deployed a hotfix to the game that should provide a significant performance optimization to unit aura processing.

The UNIT_AURA event now has two new payloads:
isFullUpdate – a boolean indicating that the consumer should do a full update on their data

updatedAuras – a vector of information about the auras that changed.

The intent of these changes is to provide more information so that consumers can “early-out” of the update without needing to do a full iteration over all auras for a unit.

This should not break any existing addons, but we strongly recommended that addon authors who register for the UNIT_AURA event make use of this new information while processing auras.

A new helper function, AuraUtil.ShouldSkipAuraUpdate(), has been added to AuraUtil.lua to facilitate this. To use it, forward in the new event payloads as well as a callback function that returns whether the argument aura is relevant to the system. If the helper returns true, you can safely skip any updates in response to the event. See CompactUnitFrame_UpdateAurasInternal in CompactUnitFrame.lua for example usage.

Unit frame and nameplate addons are the most likely to see significant performance gains by using this optimization, particularly in encounters where many unit frames and/or nameplates are on screen at once.

Thank you!

10 Likes

Hmm this sounds good. I notice that with unit frames especially has the biggest hit to cpu load thus reducing fps as the game is getting cpu bottleneck.

Hopefully 10.0 can bring in some more use of multi core usage. DX12 changes were amazing in BFA, but shadowlands added Ray tracing…which hardly anyone uses or can even notice when its on.

What we need is the engine to be able to use more cpu cores, dedicated core assignments for game and addons

4 Likes

I hope this fixes the issue where I get under 20 fps during Anduin intermissions with a Ryzen 5 3600 and an RTX 2080 Super and 32g of ram.

This seems to have broken Z-Perl Unitframes from showing player buffs. Found the bug reported to Z-Perl’s GitHub. Not well enough versed in lua to attempt to edit it myself. halp!

1 Like

Would this have an affect on TBC Classic? It seems that weapon swing timing addons are not working correctly after this update.

This broke BigDebuffs. Hots are very inconsistent on the Blizzard raid frames atm. I can only see 3 or none hah.

I thought of a cool idea of what if there was a place in wow you could go to and learn code while in game with wow developers and other players? Kinda like on-line classes you could show up at a learn time. :laughing: