Improve radius jewel tooltip performance#9863
Draft
mcagnion wants to merge 3 commits into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
outputRevisionchanges.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
outputRevisionepoch and are discarded after build output changes.Steps taken to verify a working solution:
busted --run=default --output=gtest ../spec/System/TestRadiusJewelStatDiff_spec.luabusted --run=default --output=gtest ../spec/System/TestTreeTab_spec.luabusted --run=default --output=gtestLink 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.