mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-31 04:39:01 +00:00
The grapheme map previously allowed its open-addressed table to fill completely. Inserts and misses therefore degraded into full-table scans as grapheme storage approached capacity. Limit usable slots to eighty percent of the raw table. Reaching the limit grows the page before probes become pathological without doubling grapheme map metadata on pages that contain no graphemes. The benchmark caps its resident set at the same production limit. Exact row compaction now derives its minimum byte request from the same allocator-to-map layout helper used by Page.layout. This prevents layout policy changes from under-sizing a compacted map. A sweep over 1 through 4,096 entries pins the relationship. ReleaseFast medians use eleven sequential runs after two warmups and report user CPU time. Rows above the 80% boundary compare the same resident entry count before and after the new policy grows the page. | pre-growth occupancy | before | after growth | change | |---:|---:|---:|---:| | 80% | 79.622 ms | 78.454 ms | -1.5% | | 90% | 155.778 ms | 26.572 ms | -82.9% | | 94% | 216.450 ms | 15.096 ms | -93.0% | | 100% | 688.143 ms | 5.754 ms | -99.2% | Real VT medians use seven sequential runs after two warmups. | workload | before | after | change | |---|---:|---:|---:| | ASCII, 219 MiB | 225.927 ms | 227.741 ms | +0.8% | | grapheme, 1 extra codepoint | 361.388 ms | 368.598 ms | +2.0% | | grapheme, 5 extra codepoints | 449.764 ms | 456.409 ms | +1.5% | | grapheme, 32 extra codepoints | 2.024 s | 2.024 s | +0.0% | A standard production page retains 512 raw map slots, a 10,768-byte map buffer, and a 409,600-byte total layout. Its usable map limit moves from 512 to 409 entries, so capacity grows before the final allocator chunks are consumed.