Skip to content

fix(oUF_AuraWatch): add execution budget check to prevent script timeout#1867

Closed
mjodheim wants to merge 1 commit into
tukui-org:mainfrom
mjodheim:fix/12.0-aurawatch-budget-timeout
Closed

fix(oUF_AuraWatch): add execution budget check to prevent script timeout#1867
mjodheim wants to merge 1 commit into
tukui-org:mainfrom
mjodheim:fix/12.0-aurawatch-budget-timeout

Conversation

@mjodheim

@mjodheim mjodheim commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Description

FilterIcons in oUF_AuraWatch.lua processes 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 of UnpackAuraData (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 debugprofilestop budget check (20ms) inside the FilterIcons iteration loop. When the budget is exceeded, the loop breaks early. The next UNIT_AURA event restarts FilterIcons, 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

  • Reproduced with a Warlock targeting a unit with ~50+ auras → timeout every time
  • After fix: no timeout, all auras render within 1-2 frames
  • No regression on normal unit frames (player, target with <20 auras)

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.
@mjodheim

mjodheim commented Jul 5, 2026

Copy link
Copy Markdown
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.

@mjodheim mjodheim closed this Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant