Large files made idle CPU spike because every frame re-measured every line, recompiled the search regex per line, and ran full per-line rendering work even for off-screen rows. - Render only visible rows (with a small margin for smooth scrolling) and advance the layout cursor to preserve total content height. - Hoist the search std::regex compilation out of the per-line loop. - Cache the max line width on the renderer; reset only when the buffer or font changes, not on every edit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 KiB
37 KiB