• Optimize ImGui renderer: viewport culling and width caching

    kyle released this 2026-04-20 22:12:44 +00:00 | 0 commits to master since this release

    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

    Downloads