Skip to content

Perf S5: extreme-zoom dot mode — hide edges, halve painted els (whole-graph pan 13→30)#71

Merged
mvalancy merged 1 commit into
developfrom
perf/large-graph-s6-dot-mode
Jun 15, 2026
Merged

Perf S5: extreme-zoom dot mode — hide edges, halve painted els (whole-graph pan 13→30)#71
mvalancy merged 1 commit into
developfrom
perf/large-graph-s6-dot-mode

Conversation

@mvalancy

Copy link
Copy Markdown
Member

Final stage of the measured large-graph perf effort (follows #68, #69, #70)

Earlier stages proved the whole-graph view is paint-bound — the browser
composites every visible SVG element on each pan/zoom transform change, and a
JS-side handler throttle did nothing (measured, rejected). The only lever left is
painting fewer elements.

Change — "dot mode"

Below scale 0.2 on a dense graph (the whole-graph fit view), edges are
sub-pixel hairlines but ~half of what's painted after simplify. data-dots:

  • CSS hides all edges + edge hitboxes;
  • updateEdgePositions early-returns (skips the 1400-edge per-tick pass).

Each node is already just its colored card (S4), so the overview becomes a clean
card grid. Edges + full detail return as you zoom in past the threshold
(verified: fit → 0 edges visible; zoomed-in → 18 edges + full detail restored).

Completes the LOD ladder you asked for ("remove buttons and simplify nodes as we
zoom out"): full detail → card-only/no-buttons (S4, <0.45) → dots/no-edges (<0.2).

Result (Compute Core, 1000n/1400e, serial profiler)

metric before effort now
painted els (fit) ~2400 1000
pan FPS ~13 30 / 33
zoom FPS 0.8 → 10.5 21 / 22
drag (whole) 1.2 15 / 8
idle 6.7 60

Visuals

Dot-mode fit view = tidy card grid (no buttons/edges/detail); zooming in restores
titles, status/priority bars, buttons, edges with labels + arrows. Screenshots
verified.

Verification

  • web typecheck 0; THE GATE 5/5
  • node-inspector + hierarchy-navigation green (zoomed-in interaction intact)

🤖 Generated with Claude Code

… (whole-graph pan 13→30, zoom 10→21)

The earlier stages proved the whole-graph view is PAINT-bound: the browser
composites every visible SVG element each time the pan/zoom transform changes,
and a JS-side handler throttle did nothing (rejected). The only lever left is
painting fewer elements.

Below DOT_SCALE (0.2) on a dense graph — i.e. the whole-graph "fit" view — edges
are sub-pixel hairlines that convey little but are ~half of what's painted after
simplify. Dot mode (`data-dots`) hides all edges + their hitboxes via CSS and
skips the entire 1400-edge per-tick positioning pass (dotModeRef early-return in
updateEdgePositions). Each node is already just its colored card from S4, so the
overview becomes a clean card grid. Edges + full detail return as you zoom in
past the threshold (verified: fit → 0 edges; zoomed-in → edges + detail restored).

This completes the LOD ladder the user asked for ("remove buttons and simplify
nodes as we zoom out"): full detail (zoomed in) → card only, no buttons (S4,
<0.45) → dots, no edges (S5, <0.2).

Measured (Compute Core, 1000n/1400e, serial), whole-graph fit view:
  painted els   ~2400 → 1000
  pan FPS       ~13 → 30 (HIGH) / 33 (LOW)
  zoom FPS      10.5 → 21 / 22
  drag FPS      3 → 15 / 8
  idle FPS      60 (preserved)

profiler adds data-dots + paintedEls + a pan-FPS measurement.

Verified: web typecheck 0; THE GATE 5/5; node-inspector + hierarchy-navigation
green (zoomed-in detail/edges restore correctly).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧪 Comprehensive Test Suite

  • Unit suites (Node 18.x & 20.x) — core, web, server, mcp-server: ✅ passed
  • Installer & deploy config: ✅ passed

Full-stack smoke gate runs in the CI workflow.

@mvalancy mvalancy merged commit 4623f23 into develop Jun 15, 2026
16 checks passed
@mvalancy mvalancy deleted the perf/large-graph-s6-dot-mode branch June 15, 2026 15:23
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