New UNIT_AURA Processing Optimizations
Blue Tracker last edited by
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.
Source: New UNIT_AURA Processing Optimizations, Author: Kaivax, Posted: Monday, March 21st 2022, 9:12 pm