โ– humdrum codex / glint v1.0.2
license AGPL-3.0

โ† issues

TASK-032 Memoize editor visual model โ€” fix scroll/open lag

๐Ÿ Done bug priority: high performance

created 2026-06-30 20:44 ยท updated 2026-06-30 20:44

Description

buildVisual() rescanned+rewrapped+restyled the whole document on every View, cursor move, and scroll tick (no caching). Per single scroll row: 20ms/62MB at 500 lines, 133ms/345MB at 2000 lines w/ spell. Caused open-doc lag and scroll stutter. Fix: memoize the scan+wrap model (e.visual []vrow), invalidate only on scan/wrap input changes (Lines/Width/theme/spell/codeFile). Scroll/render now O(visible) ~0.4ms, independent of doc size.

Acceptance Criteria