fix(oUF_AuraWatch): add execution budget check to prevent script timeout#1867
Closed
mjodheim wants to merge 1 commit into
Closed
fix(oUF_AuraWatch): add execution budget check to prevent script timeout#1867mjodheim wants to merge 1 commit into
mjodheim wants to merge 1 commit into
Conversation
FilterIcons can exceed Blizzard's execution budget (~200ms) when processing many auras simultaneously (e.g. Warlock with pets, raid boss frames). Each iteration calls UnpackAuraData which unpacks 15+ fields and may trigger secret-aura coercion, adding enough per-aura overhead to timeout on dense unit/frame configurations. Add a debugprofilestop budget check (20ms) inside the iteration loop. When the budget is exceeded, the loop breaks early and the next UNIT_AURA event picks up where it left off — visually imperceptible one-frame delay vs a hard script timeout.
Contributor
Author
|
Closing — superseded by #1845 which includes the same FilterIcons rewrite (while→for+snapshot+budget) plus additional fixes (AuraBars, AuraHighlight, PetBar, Range). Keeping both open would create merge conflicts. |
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.
Description
FilterIconsinoUF_AuraWatch.luaprocesses all auras synchronously in a single event handler call. When a unit has many active auras (e.g. Warlock with pets, raid boss frames), the per-aura overhead ofUnpackAuraData(15+ field lookups plus secret-aura coercion) can accumulate enough to exceed Blizzards ~200ms execution budget, resulting in a "script ran too long" error.Fix
Add a
debugprofilestopbudget check (20ms) inside theFilterIconsiteration loop. When the budget is exceeded, the loop breaks early. The nextUNIT_AURAevent restartsFilterIcons, and since the aura table has not changed,next()resumes where it left off — the remaining auras appear with a one-frame delay that is visually imperceptible.Testing