A simple, high performance text editor.
Go to file
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
.qwen Add ShapeText/DrawShapedText: single shaper call, zero-call drawing 2026-05-12 12:06:28 -04:00
cmd/pad IME: map commits against the whole buffer; drop the renderer-side model 2026-09-13 11:57:38 -04:00
doc Restore the browser page on relaunch, not the last edited file 2026-09-03 12:11:44 -04:00
internal Fix scroll slowdown at depth: bound the render window with word wrap 2026-09-13 13:04:00 -04:00
scripts IME: map commits against the whole buffer; drop the renderer-side model 2026-09-13 11:57:38 -04:00
tools/touchinject Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
.DS_Store Add drawPng function to Renderer for PNG icon rendering 2026-05-10 06:26:29 -04:00
.gitignore Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
go.mod IME: map commits against the whole buffer; drop the renderer-side model 2026-09-13 11:57:38 -04:00
go.sum Bump gioui.org v0.10.0 -> v0.10.2 2026-09-02 19:36:08 -04:00