Perf: cut crosshair/hover hot-path cost (shared UI, both apps) (P2)#1113
Merged
Conversation
CorrelatedCrosshairManager (Overview timeline lanes): - Throttle 16ms -> 33ms and skip the whole update when the cursor hasn't moved a full pixel horizontally (the crosshair only tracks X) — a near-still mouse was re-rendering all 5 lane plots up to 60x/sec. - Skip lanes whose chart isn't visible. - Popup: only toggle IsOpen when a re-anchor is actually needed (flagged on tab visibility/load transitions); updating the offsets moves an open popup. Toggling every move tore down and recreated the popup's native window each frame. - Cache + Freeze the tooltip brushes (defaultBrush was newly allocated per move; RedBrush/GreenBrush/DimBrush were unfrozen). - MouseLeave only refreshes lanes whose VLine was actually showing. ChartHoverHelper (~40 per-chart hovers): - Same popup re-anchor flag (no per-move HWND teardown/recreate). - FindNearestBar computes the bar half-width in pixels once per plot instead of two GetPixel calls per bar (constant on a linear axis). Build: solution builds clean (net10). UI-render hot path — validate hover on the running apps. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Shared-UI crosshair/hover hot-path fixes (P2) — improves hover smoothness in both apps.
CorrelatedCrosshairManager (Overview timeline lanes): 16ms→33ms throttle + skip when the cursor hasn't moved a full pixel horizontally (was re-rendering all 5 lane plots up to 60x/sec on a near-still mouse); skip invisible lanes; popup re-anchor flag instead of tearing down/recreating the popup's native window every frame; cached+frozen tooltip brushes; MouseLeave only refreshes lanes whose VLine was showing.
ChartHoverHelper (~40 per-chart hovers): same popup re-anchor flag;
FindNearestBarcomputes bar half-width once per plot instead of twoGetPixelcalls per bar.Build: solution clean (net10). UI-render hot path — validate hover on the running apps.
🤖 Generated with Claude Code