Skip to content

Reduce equipment frame update stalls - #2

Open
Minnona wants to merge 1 commit into
Rhenyra:mainfrom
Minnona:agent/reduce-equipment-frame-stalls
Open

Reduce equipment frame update stalls#2
Minnona wants to merge 1 commit into
Rhenyra:mainfrom
Minnona:agent/reduce-equipment-frame-stalls

Conversation

@Minnona

@Minnona Minnona commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • skip equipment tooltip scans while the character or inspect frame is hidden
  • coalesce bursts of inventory-change events before refreshing equipment text
  • refresh once when the relevant frame becomes visible
  • spread item-level tooltip scans across frame updates
  • update durability text directly without rescanning every equipped item
  • avoid rebuilding character stat categories when the active talent group is unchanged

Root cause

Every UNIT_INVENTORY_CHANGED event synchronously rebuilt item-level and durability text for all equipped slots, including while the paper-doll frame was hidden. Opening the character frame also rebuilt its stat categories even when the active talent group had not changed. Event bursts therefore concentrated repeated hidden-tooltip work into visible frame stalls.

Impact

Background inventory events become inexpensive, repeated events collapse into one refresh, and the unavoidable tooltip work is distributed instead of running as one large synchronous batch.

Validation

  • Lua 5.1 parsing passed for both changed files
  • git diff --check upstream/main...HEAD
  • live character-frame and hidden-frame profiling completed without Lua errors
  • visible test: three refreshes produced 51 slot updates, with a 0.69 ms average and 1.17 ms maximum per slot
  • baseline full refreshes averaged roughly 8 ms and peaked at 10.38 ms
  • hidden test: 36 durability events produced zero equipment refresh or slot-scan calls
  • durability events no longer trigger full item-tooltip scans

@Minnona
Minnona marked this pull request as ready for review August 12, 2026 19:50
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