TellMeWhen

TellMeWhen

24M Downloads

Integrate new UNIT_AURA event payload

ascott18 opened this issue · 1 comments

commented

See https://eu.forums.blizzard.com/en/wow/t/new-unitaura-processing-optimizations/347792

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!

Integrating this into buff/buffcheck icon types is easy (I already did). Integrating this into conditions is a bit harder due to the way that condition event handlers work (but still doable).

commented

Related: #1930