mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-15 21:14:35 +02:00
The TextCache interns every unique multi-codepoint cell text for the lifetime of the window with no eviction, so a stream of unique texts (for example random combining mark sequences) grows memory without bound, several hundred MB/hour at moderate throughput. Mirror the existing hyperlink pool garbage collection: every 8192 newly interned entries, steal the cache contents and have the Screen remap the index in every live cell (history buffer, main and alt line buffers, paused rendering snapshot and overlay line), re-interning only entries still referenced by some cell. Entries whose last reference scrolled out of the history buffer are freed. See #10249 Co-Authored-By: Claude <noreply@anthropic.com>