Skip to content

0.6.0 — Interaction Performance

Latest

Choose a tag to compare

@pa1ar pa1ar released this 24 Feb 12:27
· 5 commits to main since this release
d4d2462

Improved

  • Adjacency index for O(1) node connection lookups (was O(n*m) per node per frame)
  • Stable useCallback references for color/width functions prevent unnecessary graph re-renders
  • Throttled hover events (50ms) reduce state update cascading during mouse movement
  • Debounced search input (150ms) avoids filtering all nodes on every keystroke
  • transition-colors on buttons instead of transition-all eliminates layout recalculation
  • Map-based node type lookups in graph filtering replace O(n) .find() per link

New

  • Extracted lib/graph/interaction.ts — pure, testable graph interaction logic
  • 29 new unit tests covering all interaction functions