Pad/internal
Greg Pomerantz 36b6a86873 Fix scroll slowdown at depth: bound the render window with word wrap
With word wrap on, VisibleByteRange mapped the viewport TOP from visual
to logical line space (WrapIndex.LineForVisual) but left the viewport
BOTTOM as the raw visual-line number and used it as a LOGICAL index.
The window therefore fetched (viewport lines + every wrapped line above
the viewport) of real text: an over-fetch that grew without bound with
scroll depth. Measured on a 2.9 MB file with wrap on: the shaped window
was ~3.7 KB at 300 KB depth but ~17.4 KB at 2.8 MB depth, costing
12 ms of shaping and 40 ms of frame draw per frame there — scrolling
visibly degraded the further down the file you got.

Map the bottom through LineForVisual exactly like the top: the logical
line containing the viewport's bottom visual line is the correct end,
and since each logical line yields at least one visual line the window
still always covers the viewport. The fetch is now viewport-bounded at
every depth (window flat at ~1 KB across 300 KB..2.8 MB in the test
file; deep frames drop from 40 ms to <4 ms).

Also drop the instrumentation added while diagnosing.
2026-09-13 13:04:00 -04:00
..
browser Reload the previous directory's list after a failed navigation 2026-09-03 12:53:23 -04:00
editor Fix scroll slowdown at depth: bound the render window with word wrap 2026-09-13 13:04:00 -04:00
io/pool IME: map commits against the whole buffer; drop the renderer-side model 2026-09-13 11:57:38 -04:00
perf Add pre-release frame-regression profiling 2026-08-20 14:18:08 -04:00
test/e2e IME: map commits against the whole buffer; drop the renderer-side model 2026-09-13 11:57:38 -04:00
ui IME: map commits against the whole buffer; drop the renderer-side model 2026-09-13 11:57:38 -04:00