Skip to content

v0.16.4

Choose a tag to compare

@tya5 tya5 released this 10 Aug 23:54
· 13 commits to main since this release

Three issues found by profiling the caches and hot paths.

Fixed

  • The gutter and separator caches are released on leaving the band, like body strips already were (0.16.2). They're the same kind of per-frame paint cache but were only cleared on removal / decorator change / resize — so with a decorator configured (the per-message state gutter, a headline feature) memory still grew with every entry visited. Measured over 400 entries: gutter cache ~visited count → 4 (the band).

Performance

  • Viewport.offset_of is O(1) instead of a linear scan. It sits on the streaming path — every content change re-anchors the text cursor through it — and the id index it needed already existed. At 10 000 entries: 0.230 ms → 0.008 ms.
  • FlowLayout per-entry operations no longer scan the whole cache. store runs on every completed present and every patch_rows chunk, release on every off-screen update, yet each scanned all cached keys to find that entry's own. They now use a per-entry index. At a 10 000-entry cache: store 0.155 ms → 0.001 ms, release 0.302 ms → 0.0001 ms — both now flat in cache size.

Full Changelog: v0.16.3...v0.16.4