From b3b2768cc82105fa2a1845b7a7a3767c51173afb Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 29 Oct 2026 18:39:54 -0300 Subject: docs/next-daemon.md: phase 4's gates and perf (every cell inside its A/A), and what is not done; ponytail marks for the shortcuts left (a paste shared by every terminal, a second window's hit test, one display density per process) Co-Authored-By: Claude Opus 5.5 --- docs/next-daemon.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/next-daemon.md b/docs/next-daemon.md index b5939b9d..3d4c8a08 100644 --- a/docs/next-daemon.md +++ b/docs/next-daemon.md @@ -382,6 +382,17 @@ the ponytail lens: steps, each with its own size; `zig build replay` runs its seeds at one view and at three. The GUI's test feed takes `ESC]777;view;BEL`, and PARDES_TEST_VIEWS=N opens N more hidden windows, captured under view-k. +- **Not done, and why.** + - A view of the other kind (a terminal on a window session, a window on + a terminal's): each process links one frontend; the daemon still + matches kinds. + - 9P acts in the live view, the one whose client spoke last: no view is + named in a path yet (a script's focus or layout is that view's). + - Every change draws every view (`needs_frame` is the session's); a + view's own dirtiness waits for a measurement that wants it. + - Prompts are the pane's: a `.name` prompt drafted in one view is + closed by another view's step, where that pane has not the keyboard. + - Dump, Restore and Handover keep one view, the live one. - **What proved wrong in the design.** "Views" in the design were a struct the core reads through; the swap made them cheaper and kept every reference. Its rollback copy (phase 5) is the same list of fields. The @@ -391,9 +402,60 @@ the ponytail lens: other's tag heights. And the census's single "frontend kind" leak is not per process but per client: kitty graphics are a terminal's. -Measured: PERF_TABLE +Measured: ReleaseFast, the base binaries from before the rework against +this line on phase 1's merge (vvmuwntp, before main's tty throughput +fix), interleaved base, new, base ... in one run on the perf cores, then +an A/A of the base against itself the same way; the ratio of the medians +of runs, new/base (4 runs of new, 5 of base; `--reps 25` for the core, +`--live` and `--live-gui` through the 32 MiB live driver): -Gates: GATES_TABLE +| | new/base | A/A | +|---|---|---| +| core, medium: render, keys, PageDown, wheel | 0.97-1.02 | 0.99-1.01 | +| core, medium: edit-char, edit-twin, deep-sel | 0.90-0.96 | 0.99-1.00 | +| core, medium: open, body-2m, body-appends | 0.94-1.02 | 0.88-1.08 | +| tty, keystroke to present p50 (5 gestures) | 0.94-1.11 | 0.90-1.02 | +| tty, the core's part of it p50 | 0.95-1.04 | 0.86-0.99 | +| tty, `yes \| head -c 32M` wall; 1M-line open | 0.96; 0.98 | 1.09; 1.02 | +| GUI, keystroke to present p50 (present-bound, 30 ms) | 0.98-1.01 | 1.03-1.10 | +| GUI, the core's part of it p50 | 0.84-1.01 | 1.01-1.19 | + +Every cell is inside its A/A; the widest, the tty's PageDown at 1.11 +(runs 386-506 us against 410-451), is 0.94 best against best. What one +view pays is a byte test in the pump, the step's sync and an edit +(`views.several`), a store a key, an index for the live terminal or +window, and a `from` never posted. A first A/B, of this line before the +rebase onto phase 1's merge (its render still made the geometry afresh +every frame), read the GUI's core at 0.89-1.16 with no A/A to set it +against; it is not the one reported. + +Two views (not gated): every frame draws both, so a change costs two +renders; a view switch copies ~60 fields and each pane's share, a few +microseconds. + +Gates, on the line rebased onto main's tty throughput fix (qzsouslm): + +- `zig build replay -Dplatform=tty`: 112 snapshot scripts pass (the 110, + views.snap and views-term.snap), their 130 tapes replay in all three + replicas (390 runs, 29,355 digests); 20 monkey seeds at one view (60 + runs, 14,010 digests) and 20 at three views (60 runs, 9,720 digests); + no divergence, no panic. views.snap: 75 digests a replica, + views-term.snap 35. +- Unit tests: tty 1478 of 1498 pass, 20 skipped; GUI 1549 of 1560, 9 + skipped and 2 failed, the same two that fail on phase 1's line (`tagline + pointer mapping retains physical grips...` and `a tag caret past its + row's end glides...`). The views' own: 7 (own cursor, scroll, mode, + layout and focus; an edit and a register shared; a terminal sized by its + last typist; views closing; the other views drawn leave the digest; a + view keeps its place in a text another edits). +- test/fs.py passes (with a TMPDIR short enough for the 9P sockets' + paths). test/daemon.py: 20 detach and attach cycles, then a second + terminal on the attached session, both drawn, detached from inside and + then closed outright, the first drawing on, and the kill and Adopt; + `--gui`: 10 window cycles, then a second window on the open one, + detached alone. +- `pardes-monkey --views=3 --tape` found the one divergence fixed here + (the drawn views' post_present). ## FreeBSD notes -- cgit v1.3