Skip to content

Perf: cut crosshair/hover hot-path cost (shared UI, both apps) (P2)#1113

Merged
erikdarlingdata merged 1 commit into
devfrom
feature/perf-shared-crosshair
Jun 11, 2026
Merged

Perf: cut crosshair/hover hot-path cost (shared UI, both apps) (P2)#1113
erikdarlingdata merged 1 commit into
devfrom
feature/perf-shared-crosshair

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

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; FindNearestBar computes bar half-width once per plot instead of two GetPixel calls per bar.

Build: solution clean (net10). UI-render hot path — validate hover on the running apps.

🤖 Generated with Claude Code

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>
@erikdarlingdata erikdarlingdata merged commit 3f1aef8 into dev Jun 11, 2026
@erikdarlingdata erikdarlingdata deleted the feature/perf-shared-crosshair branch June 11, 2026 21:14
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