Skip to content

krd v0.1.2

Choose a tag to compare

@github-actions github-actions released this 29 Oct 14:43
· 173 commits to main since this release

Everything in this release comes from the performance issues, and every number below is from the new
krd --bench (no terminal needed):

krd --bench --pane 137x44 --cell 17x33

Compression now runs on all cores. It was >90 % of the frame budget, single-threaded. The dirty
tiles of a frame are compressed with DispatchQueue.concurrentPerform; escape assembly stays serial so
the pty writes stay ordered. A full repaint went from 39.8 ms → 3.8 ms on noisy content and
5.9 ms → 0.7 ms on text.

zlib level per tile. Text compresses to 2 % at level 9; sensor noise gains 1 % going 1 → 9 for six
times the CPU. Each tile now remembers the previous frame's ratio and picks 9 / 5 / 1 with a 3 %
hysteresis band.

Tiles are 8×4 cells instead of 16×8. One character now costs 727 B instead of 2132 B (−66 %);
one text line 8.6 KB instead of 12.8 KB. (A full text repaint costs ~46 % more, but that only happens
on resize/reconnect.)

f=24 instead of f=32. The desktop is opaque, so alpha was 25 % dead weight: a full photo costs
3.56 MB instead of 4.07 MB. --format rgba is the fallback if a terminal mishandles RGB.

One synchronized-update block per frame, not per tile: 16 bytes per frame instead of 16 × 66, and
the per-tile environment lookups are gone.

Capture no longer copies the whole frame. Two rotating buffers + vImageConvert_BGRA8888toRGB888.

Also new: --bench and --pane, a Tests/krdTests target (9 tests, swift test is green), and
docs/ENCODING.md with the full benchmark matrix and the reasoning.

If a picture that used to work now looks black or garbled, run with --format rgba and open an issue.