Skip to content

Optimize high-frequency layout updates - #113

Open
argium wants to merge 4 commits into
mainfrom
optimize-fps-event-layouts
Open

Optimize high-frequency layout updates#113
argium wants to merge 4 commits into
mainfrom
optimize-fps-event-layouts

Conversation

@argium

@argium argium commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • coalesce high-frequency bag and aura update bursts
  • keep ExtraIcons, BuffBars, and ExternalBars updates local when downstream geometry is unchanged
  • preserve healthstone cooldown and final-consumption behavior
  • document the owner-local update paths and add regression coverage

Validation

  • busted Tests
  • luacheck . -q

Coalesce bag and aura update bursts, keep content-only changes local to their owning modules, and reserve full layout passes for downstream footprint changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2cec0c4c-7ea8-4f89-86f4-549413d73fde
Copilot AI review requested due to automatic review settings July 11, 2026 10:47
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown

Test Results

952 tests  +4   952 ✅ +4   2s ⏱️ ±0s
  4 suites ±0     0 💤 ±0 
  4 files   ±0     0 ❌ ±0 

Results for commit 658fcca. ± Comparison against base commit 8e47b2f.

This pull request removes 81 and adds 85 tests. Note that renamed tests count towards both.
Tests/Modules.BuffBars_spec_lua:1069 ‑ BuffBars real source styleBarHeight propagates height to frame, bar, and icon
Tests/Modules.BuffBars_spec_lua:1079 ‑ BuffBars real source styleBarHeight uses module config height when provided
Tests/Modules.BuffBars_spec_lua:1088 ‑ BuffBars real source styleBarBackground applies background color and texture
Tests/Modules.BuffBars_spec_lua:1117 ‑ BuffBars real source styleBarColor applies spell color to the status bar
Tests/Modules.BuffBars_spec_lua:1143 ‑ BuffBars real source styleBarColor schedules retry when all identifiers are secret
Tests/Modules.BuffBars_spec_lua:1152 ‑ BuffBars real source styleBarColor fills timeless aura bars solid
Tests/Modules.BuffBars_spec_lua:1168 ‑ BuffBars real source styleBarColor does not compare secret status bar values when checking for timeless auras
Tests/Modules.BuffBars_spec_lua:1185 ‑ BuffBars real source styleBarColor keeps the background solid after Blizzard refreshes a timeless aura
Tests/Modules.BuffBars_spec_lua:1206 ‑ BuffBars real source styleBarColor restores the normal background after a timeless aura expires
Tests/Modules.BuffBars_spec_lua:1233 ‑ BuffBars real source styleBarColor keeps the normal background for an empty bar slot when hide-when-inactive is off
…
Tests/Modules.BuffBars_spec_lua:1024 ‑ BuffBars real source clears _layoutRunning even when styleChildFrame throws
Tests/Modules.BuffBars_spec_lua:1116 ‑ BuffBars real source styleBarHeight propagates height to frame, bar, and icon
Tests/Modules.BuffBars_spec_lua:1126 ‑ BuffBars real source styleBarHeight uses module config height when provided
Tests/Modules.BuffBars_spec_lua:1135 ‑ BuffBars real source styleBarBackground applies background color and texture
Tests/Modules.BuffBars_spec_lua:1164 ‑ BuffBars real source styleBarColor applies spell color to the status bar
Tests/Modules.BuffBars_spec_lua:1190 ‑ BuffBars real source styleBarColor schedules retry when all identifiers are secret
Tests/Modules.BuffBars_spec_lua:1199 ‑ BuffBars real source styleBarColor fills timeless aura bars solid
Tests/Modules.BuffBars_spec_lua:1215 ‑ BuffBars real source styleBarColor does not compare secret status bar values when checking for timeless auras
Tests/Modules.BuffBars_spec_lua:1232 ‑ BuffBars real source styleBarColor keeps the background solid after Blizzard refreshes a timeless aura
Tests/Modules.BuffBars_spec_lua:1253 ‑ BuffBars real source styleBarColor restores the normal background after a timeless aura expires
…

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces global layout churn during high-frequency update bursts by deferring/coalescing module-owned updates (ExtraIcons bag cooldown reconciliation, ExternalBars aura hooks, BuffBars player auras) and only requesting downstream/global layout when geometry-affecting state changes. It also updates module docs and adds regression coverage around the new deferred update paths.

Changes:

  • ExtraIcons: coalesce BAG_UPDATE_COOLDOWN bursts into one deferred reconciliation; request global layout only when the main viewer footprint changes.
  • ExternalBars: coalesce viewer UpdateAuras bursts; apply owner-local layout updates when aura count is unchanged, and request global layout only when count changes.
  • BuffBars: coalesce player UNIT_AURA bursts into one deferred owner-local restyle; update docs/architecture notes and add regression tests.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Tests/Modules/ExtraIcons_spec.lua Adds coverage for deferred bag cooldown reconciliation and footprint-triggered downstream layout requests.
Tests/Modules/ExternalBars_spec.lua Adds coverage for local-only updates on same-count aura changes and burst coalescing behavior.
Tests/Modules/BuffBars_spec.lua Adds coverage for deferred owner-local restyle and timer-driven coalescing of UNIT_AURA bursts.
Modules/ExtraIcons.lua Implements deferred bag cooldown reconciliation and footprint-based downstream layout request gating.
Modules/ExternalBars.lua Implements deferred aura update coalescing plus local-only layout updates when aura count is unchanged.
Modules/BuffBars.lua Implements deferred player aura restyle path and clears pending restyle on disable.
docs/ExtraIcons.md Documents the new coalesced bag cooldown path and footprint-based downstream layout behavior.
docs/ExternalBars.md Documents coalesced aura updates and the same-count local update path.
docs/BuffBars.md Documents the coalesced UNIT_AURA owner-local restyle behavior.
docs/ARCHITECTURE.md Updates event-flow documentation to include the new owner-local coalescing paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Modules/BuffBars.lua
argium added 3 commits July 11, 2026 20:56
Discover changed aura keys during owner-local restyles so the spell color options remain current without requiring a global layout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2cec0c4c-7ea8-4f89-86f4-549413d73fde
Apply the same child setup invariant used by full layouts so early aura events and newly introduced children can be restyled safely.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2cec0c4c-7ea8-4f89-86f4-549413d73fde
Avoid treating the expected early-startup absence of BuffBarCooldownViewer as an enumeration failure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2cec0c4c-7ea8-4f89-86f4-549413d73fde
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.

2 participants