Skip to content

Pinned frames: stop running in arena/battlegrounds (fixes "script ran too long")#136

Open
Krathe82 wants to merge 1 commit into
DanderBot:mainfrom
Krathe82:pr/pinned-pvp-freeze
Open

Pinned frames: stop running in arena/battlegrounds (fixes "script ran too long")#136
Krathe82 wants to merge 1 commit into
DanderBot:mainfrom
Krathe82:pr/pinned-pvp-freeze

Conversation

@Krathe82

@Krathe82 Krathe82 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Problem

Multiple users have reported two related issues with Pinned Frames in instanced PvP:

  1. Features/PinnedFrames.lua:NNNN: script ran too long
  2. Pinned frames showing in arena even when the user expects them gone.

In 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 — ProcessAllSetsUpdateAllHeadersResizeContainer — 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 ProcessAllSets now early-returns in arena and battlegrounds:

  • The gate is keyed on a per-mode disableInPvP flag 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.
  • ResizeContainer also 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.

…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.
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