Resync sends the whole scrollback, so a client behind a flood never catches up #49
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?
Found by: #48 (S19)
A client that falls behind a busy pane is sent the pane's whole scrollback every time it catches up, so under a flood it never does. Both the web client and a TUI hit this.
Pane::broadcastdrops it and sendsresync.offset: null(web/src/client.ts); even with its real offset the gap is pastMAX_REPLAY_BYTES(1 MB) by then.snapshot(), up to 64k rows of history (about 5 MB a pane). Parsing that puts it further behind, and the loop starts over.spikes/s19-tui/bench.sh, four panes each runningls --colorin a loop, 200x50): 188–328 resyncs in 10 s; of 1.2–1.7 GB received, 84–90% was snapshots. Resuming from the client's offset made no difference. The screen stayed current, but the client spent 58–75% of a core on it. One flooding pane (16 MB/s) never resyncs.AttachPanegains the number of scrollback rows the client keeps (xterm.js keeps 10k; the web client today downloads 64k and drops 54k of them).screen_snapshot, the path M13'sflooruses). The client keeps its own scrollback and marks the gap with a dim── skipped ──rule, as a restore does, rather than downloading history it already has.bench.shwith four panes: snapshots are under 10% of the bytes received, and the TUI uses under half of a core;Done 2026-10-02, merged in
a4d6490.What landed:
attachtakes ahistorycap per pane (web and the share viewer ask for 10k rows, tmux for 2000) and azstdopt-in. Snapshots of 4 KB or more come as frame kind 4. The tungstenite under axum has no permessage-deflate; the web client decodes with fzstd.history: 0. A small gap replays; otherwise it gets the screen alone, keeps its scrollback, and a dim── output skipped here ──line marks the gap.screen_snapshotno longer replays everything.S19's four-pane flood (
spikes/s19-tui/bench.sh,S19_LEGACY=1for before):Against done-when:
web/e2e/flood.spec.ts).snapshots_carry_only_the_history_asked_for).Follow-up: #52. A throttled page still takes about 10 s to read its resync, because xterm queues everything it's sent. That needs the ACK flow control PLAN describes.