Pretext + Yable

Pixel-perfect variable-height virtualization

Playground
Rows1,000
prepare()...
layout()...
Total Height...
Pretext: Every row height pre-computed before render. No DOM measurement. No scroll jitter.
Title
Excerpt
Author
Category
Words
Status

How it works

1

prepare(text, font)

Measures every glyph width via Canvas API. One-time cost per unique text+font combo. Cached across cells.

2

layout(width, lineHeight)

Pure arithmetic. Given column width, returns exact pixel height. ~0.0003ms per cell. 50k cells in 15ms.

3

Prefix sums + binary search

Pre-computed cumulative heights enable O(log n) scroll position lookup. Instant scrollTo for any row.