Skip to content
Eskais UI

Guides

Performance

What each key press may cost, how Eskais measures it in Chrome, and how to measure your own screens.

Eskais is built for keyboard-heavy applications: moving through a list, a table or a board, opening a palette, following a link. Each of those is measured in Chrome on a production build, at full speed and with the CPU slowed four times, and the counts that don't depend on the machine are held in CI.

What a key press may cost

These are exact counts: components React renders per key press (the most any of 20 presses caused) and forced layouts (style or layout the browser had to compute inside script) per press. A pull request that raises one fails until it fits or says why the budget moved.

ScenarioRendersForced layouts
List, 1,000 rows, j/k10 (the two rows that change)2.05
List, 10,000 rows, virtualized362.7
DataTable, 1,000 rows, ↓/↑953.4
DataTable navigation="cells"4 (two cells)2.2
Board, 200 cards, arrows and j/k4 (two cards' primary parts)4.85
Dropdown menu, sidebar, Shell sidebar, explorer01–3
Command palette, 300 commands, ↓6 (the row that scrolls in)1
Calendar, arrows within a month22.85

A move renders the same with 10,000 rows as with 1,000: roving focus tells only the item losing focus and the item taking it. The board holds 16 composited layers at rest (26 in the glass theme), and every registry item has a gzip budget, today's size plus 5%: link 25.5 KB, list-item 77.6 KB, data-table 82.8 KB, markdown-editor 246.6 KB with CodeMirror, React excluded and UI SDK included.

Measured times

Key to next paint: from the key press to the first frame painted after it, at the 95th percentile, on a desktop CPU. A frame is 16 ms at 60 Hz.

Scenario1×4× CPU slowdown
List, 1,000 rows, j/k8.5 ms25 ms
List, 10,000 rows, j/k10.3 ms17 ms
DataTable, 1,000 rows, ↓12.1 ms23 ms
Board, arrows11.5 ms32 ms
Command palette, open to first frame26 ms141 ms
Docs site, link press to page painted, after a 150 ms hover19 ms—

Times vary by machine and from run to run, so CI holds counts, and times are compared with interleaved runs of the two versions on one machine. The full method and every result are in the repository's docs/perf/REPORT.md.

The harness

In the Eskais repository, bun run perf drives system Chrome through Playwright and the DevTools protocol over fixtures of every hot path (lists, tables, the board, palettes, menus, tabs, typing, Shell, MasterDetail, DocumentWorkspace, server data), the overlays, mount, site navigation and bundle sizes. It prints tables and writes a JSON file with every press.

bun run perf                       # every scenario, normal and React Compiler builds, 1× and 4× CPUbun run perf --only=list-1k,table --cpu=1 --skip=held,overlays,mount,site,bundlebun run perf:ci                    # the budgets CI holds, in about a minute

To compare a change, build both versions under names and run them interleaved:

bun run perf --builds=normal@before --only=table --skip=overlays,mount,site,bundle# change the codebun run perf --builds=normal@after --only=table --skip=overlays,mount,site,bundlebun run perf --no-build --builds=normal@before,normal@after --repeat=3 --only=table \  --skip=overlays,mount,site,bundle --name=ab
  • Read the counts first: renders per press and forced layouts are exact, so a change in them is real.
  • Then the p50 and p95 key to next paint, and the dropped frames of a held key at 4×.
  • Repeat 4× runs (--repeat=3): one run at 4× can move by half. Run nothing else while measuring.

Load and layout shift

bun run perf:vitals loads pages cold on a slow 4G profile and reports TTFB, FCP, LCP, CLS and INP, with the elements each layout shift moved; perf:ci holds CLS at 0.01 or less on the blocks and the server-data components. What keeps them there:

  • Images have a size: width and height, an aspect-* box, or in Markdown the size after a | in the alt text (A chart|640x360) or MarkdownView imageSize.
  • Loading states keep the size of what replaces them: DataTable placeholder rows are one text line high, and ServerDataTable and ServerList show enough placeholders to push their footer out of view, as the first page will.
  • What sits below lazily loaded content goes in the same Suspense boundary, so it appears with it.
  • content-visibility: auto didn't pay on Eskais's lists, settings, dashboards or docs, and broke scrolling to a heading in a long MarkdownView; measure before you reach for it.

3D scenes

VinylScrubber and SafeVault draw photographic three.js scenes through the three-stage item, which they install. The scene loads in its own chunk once input has been quiet for a moment after the controls paint, and draws in a module worker on an OffscreenCanvas, or on the page where a worker can't draw. It draws once per change and every frame only while something moves on screen, so an idle page costs nothing; off screen, under reduced motion and on a software renderer (fewer frames, fewer pixels) it draws less. Without WebGL, or when its context is lost, the component's drawing stays.

Measuring your own screens

  • Measure a production build: a development build is several times slower and changes what is slow.
  • React DevTools' Profiler shows which components rendered for one key press and why. A row that renders when another row changes has an unstable prop or callback: keep getKey, renderItem and handlers stable.
  • Chrome's Performance panel, with the CPU slowed four times, shows long tasks, forced layouts (purple inside a script) and Interaction to Next Paint for each press.
  • Load the heaviest items where they show, with lazy() at the route, and start the import on intent: onIntent on Link runs on a 65 ms hover, focus or a mouse press (see Keyboard and long lists).
const MarkdownEditor = lazy(() =>  import("@/components/ui/markdown-editor").then((m) => ({ default: m.MarkdownEditor })),)

The eskais-perf skill gives a coding agent the same checks, the budgets above and the patterns that keep a screen within them.