Skip to content

Improve radius jewel tooltip performance#9863

Draft
mcagnion wants to merge 3 commits into
PathOfBuildingCommunity:devfrom
mcagnion:bugfix/radius-jewel-tooltip-performance
Draft

Improve radius jewel tooltip performance#9863
mcagnion wants to merge 3 commits into
PathOfBuildingCommunity:devfrom
mcagnion:bugfix/radius-jewel-tooltip-performance

Conversation

@mcagnion
Copy link
Copy Markdown
Contributor

@mcagnion mcagnion commented May 21, 2026

Description of the problem being solved:

Radius jewel stat comparison fixes from PR 9746 made Compare tab hovers expensive, especially when moving quickly between jewels. Full multi-slot tooltips could rebuild temporary passive specs and recalculate comparison outputs for every compatible jewel socket.

This PR keeps the existing tooltip behavior while reducing repeated work:

  • Compare tab passes the hovered slot into item tooltips and avoids rebuilding unchanged hover tooltips.
  • Affected-slot tooltips reuse temporary radius jewel comparison specs until outputRevision changes.
  • Tooltip-only comparison specs skip rebuilding UI node paths while preserving calc-relevant socket distances.
  • Full multi-slot radius jewel tooltips cache comparison outputs for repeat hovers within the same outputRevision.

Measured locally, the output cache does not improve first-pass hovers over never-seen jewels, but it strongly improves repeated/bouncing hovers:

  • compare_off_two_pass_slot_current: 247.69 -> 69.62 ms/frame, 128 -> 64 rebuilds/calc calls.
  • compare_off_bounce_two_check: 202.19 -> 18.56 ms/frame, 128 -> 16 rebuilds/calc calls.
  • stable_full_no_check: 168.80 -> 31.80 ms/frame, 40 -> 8 rebuilds/calc calls.

Memory note: cached outputs are scoped to one outputRevision epoch and are discarded after build output changes.

Steps taken to verify a working solution:

  • busted --run=default --output=gtest ../spec/System/TestRadiusJewelStatDiff_spec.lua
  • busted --run=default --output=gtest ../spec/System/TestTreeTab_spec.lua
  • busted --run=default --output=gtest
  • Local radius jewel tooltip performance matrix
  • Manual Compare tab reload/test with "Show tooltips only for affected slots" ON and OFF

Link to a build that showcases this PR:

N/A. The change is performance-focused and was verified with local Compare tab testing plus the benchmark matrix.

Before screenshot:

N/A. No visual UI change.

After screenshot:

N/A. No visual UI change.

mcagnion added 3 commits May 19, 2026 10:55
Avoid rebuilding radius-jewel comparison specs for repeated targeted tooltip hovers and skip limited-unique socket outputs that will not be shown. Preserve full multi-slot tooltip behavior when slot-only tooltips are disabled. Related local follow-up to PR 9746.
Tooltip comparison specs only need calc state, but radius jewel comparisons
were still rebuilding passive tree UI paths for every temporary spec.
Skip that path rebuild while preserving socket distance recomputation for
Split Personality-style jewel scaling.
Reuse full radius jewel comparison outputs while the build output
revision is unchanged. This reduces repeated Compare-tab hover work for
slotOnlyTooltips=OFF without caching cloned specs or changing comparison
behavior.
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