Attach: compress snapshot frames and cap history at the client scrollback (S10) #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
S10 measured a 64k-row attach on a throttled phone going from ~3.7 s to ~0.35 s with these two changes. Re-measure with real terminal output.
From PLAN.md, section "Protocol → Attach and resume".
Where the time goes: on an emulated Pixel 7 at 4x CPU throttling and 10 Mbps / 50 ms, attaching to a 64k-row pane took 3.7 s, of which 3.2 s was download. The snapshot goes out uncompressed (3.9 MB; 183 KB gzipped). The client keeps only 10k lines, so 54k of the 64k rows are downloaded and thrown away. Even a small screen takes about 150 ms to draw at 4x, which is the most visible-first could save. See spikes/s10-ghostty-web.
Do instead (small, server-side, fix now):
attach).Together they took the 64k case on the throttled phone from about 3.7 s to about 0.35 s. Real terminal output compresses worse than S10's synthetic lines, so re-measure.
M8 gives visible-first natively later, through GHOSTSNP's screen-then-history split. The design below is kept only for reference.