Reference

Benchmarks

How long the grid's own code takes per scroll event and at start, and how to run the benchmarks yourself.

The benchmarks measure the JavaScript the grid runs on a scroll event and when it starts. They run in Node with a simulated DOM, so they leave out the browser's layout and paint, and the code in your slots.

Every benchmark uses a list of 1,000,000 items in 10 columns of 100px by 100px, in a window of 1024px by 768px.

Results

Versions 1.1.6 and 1.2.0, run one after the other on an Apple M1 with Node 26.13 and Vitest 4.0. The 1.1.6 column runs the same benchmark files against the 1.1.6 source. Every value is the mean time of one run.

Scrolling

Each run sends 20 scroll events through the grid's pipeline.

Benchmark1.1.61.2.0
20 scroll events that each move the rendered window by one row1,530 ms0.40 ms
20 scroll events of 2px each, which rarely move the rendered window0.017 ms0.004 ms

In 1.2.0, one scroll event that moves the rendered window by a row takes about 20 µs. A frame at 60 frames per second lasts 16.7 ms, so the grid's code takes well under 1% of a frame. In 1.1.6 the same event took about 77 ms, which is more than four frames.

Computing the rendered window

Both rendered-window benchmarks call the functions that compute the rendered window directly, 20 times per run.

Benchmark1.1.61.2.0
20 rendered-window updates, one row apart1,460 ms0.89 ms
20 rendered-window updates within one row1,610 ms0.80 ms

Starting

Benchmark1.1.61.2.0
Create the grid's pipeline and wait until it is ready44 ms0.82 ms
The same, then recompute the layout once50 ms0.74 ms

The 1.1.6 values varied between two runs, from 34 ms to 54 ms for creating the pipeline and waiting until it is ready. The 1.2.0 values varied by about 5%.

Run the benchmarks

Clone the repository, install with pnpm install, then run the benchmarks from the repository root.

On Node 26, pnpm install fails while building better-sqlite3. Run pnpm install --ignore-scripts in that case.
pnpm -C core bench

Vitest prints one table per group, with the runs per second (hz) and the mean, minimum, maximum and percentiles in milliseconds. The sources are in core/benchmarks.

The numbers change with the machine and with what else it is running. Compare two versions on the same machine, one right after the other, as the tables on this page do.
Copyright © 2026