ghostty-next: the wrap edge break reads a compressed history row only when the pair was joined
Merged
LA
6d ago+18+18+01234567890123456789-12-12-01234567890123456789
Summary
- Follow-up to #29609, from its review note 1. In ghostty-next,
Screen.breakWrapAboveread the row above before it checked the flags. So IL or DL at the screen's top row restored the last history page from compression on every call. Under load, a region scroll can run once per output line. - The fix is fork PR manaflow-ai/ghostty-next#68. The function now decides on the resident row first (its
wrap_continuation, or for IL/DL the top row's flag read before the rows move). It reads a row in a compressed history page only when the pair was joined. - The pin moves to GhosttyNextKit
xcframework-84a225487372c53851b186864c867e469e7596d2-apple-v6, onrelease/cmux-9ce9b7d0-e2. That release is 8444cc1eb (the #29609 pin) plus only #68. The gitlink,package-notices.jsonandvt-link-graph.jsonmove with the pin. - Review note 2: every commit ID in the E2 section of
docs/ghostty-fork.mdis now a release-branch ID, and the section says so.
Testing
- Red: fork run 41240560795. The new Zig test "insertLines and deleteLines at the top row leave a compressed history page compressed" fails without the fix.
- Green: fork PR #68 run 41240575661, and the release run 41241826620, which built and published this kit.
- The cmux Rust replay tests on this pin: see the fleet step in a comment below.
Observed / Not run
- Observed: the red and green fork runs above. SHA256SUMS of the release lists
66e883f7130352862fd3dd4b46cf0a6d22d50750bf633f3589831bf9b2f4f99f, which is the checksum in Package.swift. - Not run: a timing benchmark. The test proves that the common case leaves the compressed page alone. It does not measure time.
Changelog
none
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes a performance issue in ghostty-next where Screen.breakWrapAbove read a compressed history row before checking flags, so IL or DL at the screen's top row restored the last history page from compression on every call. The function now decides on the resident row first and reads a compressed row only when the pair was joined.
- Pins
GhosttyNextKitxcframework-84a225487372c53851b186864c867e469e7596d2-apple-v6(checksum66e883f7...); the gitlink,package-notices.json, andvt-link-graph.jsonmove with it. - Adds the Zig test "insertLines and deleteLines at the top row leave a compressed history page compressed", which fails without the fix and passes with it.
docs/ghostty-fork.mdnow states that every commit ID in the E2 section is a release-branch ID.