Proof 03 · obeys law 06
A hundred thousand lines that still scroll at frame rate
A terminal’s scrollback is the hardest ordinary problem in the product: a hundred thousand lines that must scroll smoothly while a process appends to the bottom faster than anyone can read. The number this panel leads with is the longest frame in the last second, never an average — a run that holds 60fps and drops one 300ms frame averages to about 57 and reads as healthy, but that stall is the entire experience. And the virtualization has an off switch, so the claim can be watched to fail.
- worst frame · last second
- —
- average
- —
- last mount · style + layout
- —
- rows in DOM
- 31
- rows in buffer
- 100,000
budget 16.7ms
smooths the stall away
building the rows
what the browser lays out
what you can scroll to
Mount costs far more than scroll, and that ordering surprised me. Flip the switch and watch the mount meter above: it goes from single-digit milliseconds to roughly a third of a second — two orders of magnitude — while the worst scroll frame goes from about 9ms to about 75ms, call it ten times. Both are real and they are not close. The expensive thing is building twenty thousand nodes, not moving them afterwards. The ratio moves run to run, which is why the meter is live rather than a number I typed in.
It depends on what a row is made of, which is the part worth knowing. The same test against a bare page of plain <p> elements showed scrolling 20,000 rows costing exactly what 40 cost — Chrome composites a scroll and there is nothing per-frame to save. This panel's row is a flex container with two children, so 20,000 rows is 60,000 elements with a layout pass each, and that is enough to make scrolling cost real time. Whether virtualization buys you scroll performance is not a property of the list. It is a property of the row.
This panel does claim the scroll keys while it has focus — arrows, j and k, PageUp/PageDown, Home/End, g and G — because scrolling the log is the whole subject. Unlike the chord proof, that claim is earned. Tab and Escape are never taken.
Law 06
It holds frame rate when the data stops cooperating.
Measured, shown on screen, and degradable. A number you can read beats a claim you cannot check.