perf(ui): scope cooldown heartbeat to visible items

This commit is contained in:
Erik 2026-07-25 05:12:58 +02:00
parent f2a015be8e
commit 6b56f4bef2
5 changed files with 132 additions and 3 deletions

View file

@ -45,7 +45,7 @@ and repeated stable provider polls allocate no report/wrap objects.
Landed evidence:
[`../research/2026-07-25-slice-h-a1-ui-text-cache.md`](../research/2026-07-25-slice-h-a1-ui-text-cache.md).
### H-a2 — visible cooldown participants
### H-a2 — visible cooldown participants — COMPLETE
1. Keep the shared retail heartbeat and one cooldown result per represented
item.
@ -59,6 +59,9 @@ Gate: hidden inventory, equipment, external-container, vendor, and spell-bar
lists are not scanned; reopening immediately displays the authoritative
cooldown step.
Landed evidence:
[`../research/2026-07-25-slice-h-a2-cooldown-scope.md`](../research/2026-07-25-slice-h-a2-cooldown-scope.md).
### H-a3 — equipped-child transition work
1. Preserve both frame ordering points: pre-network presentation and

View file

@ -0,0 +1,24 @@
# Slice H-a2 — retained cooldown heartbeat scope
Retail updates item cooldown children from
`UIElement_UIItem::DoHeartbeat @ 0x004E1DF0`. Hidden retained subtrees do not
receive that heartbeat.
The shared acdream controller now keeps the same one-result-per-item heartbeat,
but:
- returns before reading the clock or visiting a slot when the authoritative
enchantment registry has no cooldown entries;
- visits a mounted `UiItemList` only when the list and every ancestor are
visible;
- clears the frame's step projection first, so a hidden-only item cannot retain
a stale ring;
- recomputes the authoritative step on the first heartbeat after the panel
becomes visible;
- retains existing future-slot and shared-cooldown-group behavior.
Focused tests cover shared groups/future cells, hidden-parent suppression and
reopen, and the zero-work empty-registry path.
Release gate: 3,781 App tests passed / 3 skipped; 8,265 complete-solution
tests passed / 5 skipped.