perf: reduce nameplate aura and health work#453
Merged
EllesmereGaming merged 3 commits intoJun 24, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UNIT_AURApayload before falling back to a full rebuildcurHealthvalue for health text instead of callingUnitHealth(unit)againMethod
Profiling was done with
!!!Perfyinstrumentation onEllesmereUINameplatesonly, using repeated 30-second target dummy tests. For each pass, the live!!!Perfy.luaSavedVariables file was copied before analysis, then analyzed from the copied file. NAP screenshots were used as the coarse addon-level view, and Perfy stack totals were used to identify the concrete hot paths.The first 30-second capture on five target dummies showed Nameplates at ~174.6ms in NAP and ~177.7ms in Perfy stack time. Most cost came from
UpdateAuras(~109.5ms CPU, ~11.39MB allocations) andUpdateHealthValues(~53.6ms CPU).The aura fix came from tracing the
RefreshAuras/UNIT_AURAorder.RefreshAurascould run before ourUNIT_AURAhandler had stashed the update payload, so the code marked an owed full rebuild. The next-frame drain then discarded the gated payload and calledUpdateAuras(nil), bypassing relevance checks and causing repeated full aura scans. The fix adds_auraAwaitingUnitAura: wait one frame forUNIT_AURA; if it arrives, process the gated update, otherwise do one full fallback rebuild.The second 30-second capture showed Nameplates down to ~111.9ms in NAP and ~99.2ms in Perfy. Health then became the next clear path.
UpdateHealthValuesalready readscurHealth, but health text calledUnitHealth(unit)again. ReusingcurHealthremoved that duplicate C API call.Final observed range after both fixes was ~95-100ms Perfy stack time and ~95-98ms NAP total for Nameplates in the same 30-second target dummy setup. A speculative extra aura guard was tested and dropped because it did not improve the next capture.