Back to browse
GitHub Repository

Frame latency benchmarks for terminal UI frameworks

1 starsTypeScript

React isn't the terminal UI bottleneck, the output pipeline is

by nathan-cannon·Mar 19, 2026·3 points·0 comments

AI Analysis

●●●BangerWizardryBig Brain

Cell-level diffing beats Ink's line rewriting by 1000x on bytes written.

Strengths
  • Custom React reconciler targets individual cells, not entire lines
  • Benchmarks show 2.54ms vs Ink's 36.93ms pipeline latency
  • Preserves native terminal features like scrolling and Cmd+F search
Weaknesses
  • Niche audience—only matters if you're building terminal UIs with React
  • Requires understanding React reconciler internals to extend or debug
Target Audience

Terminal UI developers, CLI tool builders

Similar To

Ink · blessed · tui-react

Post Description

Anthropic rewrote Claude Code's terminal renderer and found that React wasn't the problem. Ink's line-level rewriting was. I built their approach into a standalone library.

CellState uses a custom React reconciler that renders directly to a cell grid and diffs frame-by-frame at the cell level. You keep native terminal behavior (scrolling, text selection, Cmd+F) because it runs inline instead of alternate screen.

React's reconciler only touches the subtree that changed, and the cell diff only covers the viewport, not the full scrollback.

At 250 messages (33KB of content), a single cell update writes 34 bytes to the terminal regardless of content size. Ink writes 41,955 bytes for the same change. The full rendering pipeline (reconciliation, layout, rasterize, cell diff) takes 2.54ms vs Ink's 36.93ms.

Benchmarks and methodology: https://github.com/nathan-cannon/tui-benchmarks

https://github.com/nathan-cannon/cellstate

Similar Projects