Skip to content

Stop hidden panels from processing events - #1

Open
AndyMM22 wants to merge 1 commit into
Huijting:mainfrom
AndyMM22:perf/idle-work
Open

Stop hidden panels from processing events#1
AndyMM22 wants to merge 1 commit into
Huijting:mainfrom
AndyMM22:perf/idle-work

Conversation

@AndyMM22

@AndyMM22 AndyMM22 commented Aug 7, 2026

Copy link
Copy Markdown

Four places kept working with their panel closed.

  • ITEM_DATA_LOAD_RESULT fires hundreds of times a second while the client loads item data; VaultAdvisor and DelveCuriosAdvisor registered it for the whole session. Now registered only while the relevant panel is visible, and the curio listener arms only when a request actually queued an uncached item.
  • WorldBoss rebuilt its delves block on every QUEST_LOG_UPDATE regardless of visibility.
  • SMCChecklist rebuilt once per QUEST_LOG_UPDATE with no coalescing; the account checklist keyed on IsShown.
  • ConsumableReadyBoard subscribed to UNIT_AURA for the session but only redraws while shown.

Visibility checks use IsVisible, since a child stays shown when its window is closed.

Measurement — one client, my addon set, C_AddOnProfiler RecentAverageTime for the addon as a whole: 0.060ms -> 0.003ms per frame while standing idle with nothing open. That is the whole-addon average, not a claim that idle cost is now zero everywhere.

One honest caveat: the visibility gates mean the two checklists no longer repaint while the window is closed, so on reopening the same tab they can be briefly stale until the next quest or currency event. In practice that is seconds of play.

Each change is independent; happy to split or drop any of them.

- Register ITEM_DATA_LOAD_RESULT only while the vault or curio panel is visible;
  it fires hundreds of times a second while the client loads item data.
- Skip the WorldBoss block rebuild and the checklist rebuilds while hidden, and
  coalesce QUEST_LOG_UPDATE bursts.
- Drop the consumable board's UNIT_AURA subscription when it hides.

Visibility uses IsVisible, since a child stays shown when its window is closed.
@AndyMM22
AndyMM22 marked this pull request as draft August 8, 2026 03:44
@AndyMM22
AndyMM22 marked this pull request as ready for review August 8, 2026 04:35
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