Pinned frames: stop running in arena/battlegrounds (fixes "script ran too long")#136
Open
Krathe82 wants to merge 1 commit into
Open
Pinned frames: stop running in arena/battlegrounds (fixes "script ran too long")#136Krathe82 wants to merge 1 commit into
Krathe82 wants to merge 1 commit into
Conversation
…long") In instanced PvP the roster/unit event storm (GROUP_ROSTER_UPDATE, UNIT_TARGETABLE_CHANGED, UNIT_FACTION) fires on nearly every action, and each one re-ran the full pinned update path (ProcessAllSets -> UpdateAllHeaders -> ResizeContainer) until the per-frame time budget was exhausted, producing "PinnedFrames.lua:NNNN: script ran too long". Auto-add also pulled PvP teammates into pinned sets, so frames showed in arena even when the user expected them gone. Pinned frames are a party/raid feature, so ProcessAllSets now early-returns in arena and battlegrounds. The gate is keyed on a per-mode `disableInPvP` flag that defaults to true (nil = on), keeping the live default safe; a UI opt-in can flip it later. ResizeContainer also skips disabled sets, since that runs on the same hot path and has nothing to size when the set is off.
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.
Problem
Multiple users have reported two related issues with Pinned Frames in instanced PvP:
Features/PinnedFrames.lua:NNNN: script ran too longIn arena and battlegrounds the roster/unit event stream (
GROUP_ROSTER_UPDATE,UNIT_TARGETABLE_CHANGED,UNIT_FACTION, …) fires on nearly every action. Each event re-runs the full pinned update path —ProcessAllSets→UpdateAllHeaders→ResizeContainer— and under that churn the work piles up until the per-frame time budget is exhausted, which trips the "script ran too long" watchdog. Separately, auto-add pulls PvP teammates into pinned sets, so frames appear in arena.Fix
Pinned frames are a party/raid feature, so
ProcessAllSetsnow early-returns in arena and battlegrounds:disableInPvPflag that defaults to true (nil= on), so the live default is safe and pinned frames simply stay dormant in instanced PvP. A UI opt-in to re-enable can be added later without touching this path.ResizeContaineralso bails out for disabled sets — it runs on the same hot path and has nothing to size when the set is off.Scope
Single file (
Features/PinnedFrames.lua), no saved-variable or API changes. In party/raid (where pinned frames are meant to run) behaviour is unchanged.