Performance

Virtualization

GitGraph virtualizes rows and lane geometry using @tanstack/react-virtual. Only rows in the viewport (plus an overscan band of 8) are mounted; lane edges are clipped to the same window via the gutter's range prop. Memory and DOM-node count stay roughly constant regardless of commit-set size.

Measured worst case

At 10,000 commits with the default rowHeight=40, the Phase 5B spike measured per-browser frame times during a 5-second scripted scroll:

Browsermaxp99p95median
chromium27 ms25 ms22 ms17 ms
firefox38 ms37 ms24 ms17 ms
webkit60 ms59 ms55 ms28 ms

Webkit's 60 ms worst-case is inside one dropped frame at 60 fps and well under the production regression bar of MAX_FRAME_MS = 100 in tests/e2e/graph-virtualization.spec.ts — that ceiling is sized to catch a broken virtualizer (which would produce 200–2000 ms+ frames) without flaking on slow CI.

Tuning rowHeight

Larger rowHeight renders fewer rows per viewport and reduces frame cost roughly linearly. The default of 40 is tuned for a single-line message; bump to 56 if you render a two-line message or larger avatars.

Scenarios that degrade