diff options
Diffstat (limited to 'docs/next-run.md')
| -rw-r--r-- | docs/next-run.md | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/docs/next-run.md b/docs/next-run.md index 4d9de291..de03bfb1 100644 --- a/docs/next-run.md +++ b/docs/next-run.md @@ -74,13 +74,19 @@ counts above include each piece's comments and its callers' lines. The ruling turns these from objections into work. Each is checked here: what is true, and whether it was measured. -- **+25 MB a client.** Measured on 2026-11-06 for the one-client-path step - (`.scratch/arch/client-report.md:21-22`): idle RSS, median of 3 after - 4 s idle, a session with a second local attach: the session 34.6 to - 38.0 MB, the second process 18.6 MB as a stub to 43.8 MB as a client. - "A second local view costs a second core: about +25 MB in its own - process and +3.4 MB in the session." The build mode is not stated there. - Today only a second attach pays it; after, every attach to a detached +- **What a client costs in memory.** Measured on 2026-11-17 + (`.scratch/sketch/reports/pardes-measure.md` section A; PSS from + `smaps_rollup` after 4 s idle, the installed 0.24 ReleaseFast): a + terminal's client is 10-16 MB (20-25 after typing: tree-sitter data the + session grows by as much), a window's about 110 MB (187 MB RSS), the same + as any window session: three quarters of it the GPU and display + libraries and the window's buffers. Its core and the rollback copy it + keeps are about 1-2 MB of that. So the "+25 MB a client" measured on + 2026-11-06 (`.scratch/arch/client-report.md:21-22`) holds for a + terminal's client and is four or five times too small for a window's; + what would shed it is a lighter way to draw, not a lighter core. A + client adds about 1.3 MB to its session (a terminal's), 13 MB (a + window's with addon panes). Today only a second attach pays it; after, every attach to a detached session does, which is the tmux habit (`pardes --detach=work`, then `pardes attach work`). - **An addon's code does not run in a replica.** True, read: a client's @@ -89,17 +95,22 @@ what is true, and whether it was measured. what the session's code drew and sends (`replica.zig:309`, `:418-470`; `Replica.screen` at `:1140-1160`). Not measured: what a Shadow costs a local client against the session's own frontend drawing the pane. -- **A window client scrolls whole rows and keeps its own fonts.** Half - true. Read: a wheel's notch in a client is whole rows with no glide - (`gui.zig:2147-2150`), as `docs/next-daemon.md`'s GUI replica notes say; - but a touchpad's fractions are the client window's own picture now, only - its whole rows going to the session (the test "detached trackpad - scrolling keeps fractions local and queues whole rows for replication", - `gui.zig:8042`). Fonts: a client follows the session's font request by +- **A window client scrolls whole rows and keeps its own fonts.** Not so + for the wheel, measured (`.scratch/sketch/reports/pardes-measure.md` + sections C and E): a notch in a client glides as it does in the + session's own window (5 frames, 0 to -22 px, in both). Only whole rows + go to the session (`gui.zig:2147-2161`; its comment and + `docs/next-daemon.md`'s GUI replica notes still say "no glide"); the + picture moves between them on the client's own clock (`glideFrame`, + `gui.zig:3544`). A touchpad's fractions are the client window's own + picture too (the test "detached trackpad scrolling keeps fractions local + and queues whole rows for replication", `gui.zig:8042`). Fonts: a client follows the session's font request by the face's name when that face is installed on its machine (`gui.zig:580-608`, `syncReplicaFont`); its opacity is its own (not in the client's per-frame chores, `gui.zig:1311-1323`). The note said "keeps - its own font"; it is corrected there. + its own font"; it is corrected there. Measured: a face the client lacks + leaves it at its old face and its old size, and it diverged and joined + again (2 runs of 2, cause not found). - **Speed.** "The regular tty and GUI get no slower" is the daemon's first rule (`docs/next-daemon.md`, decided by the user). After the change, a reattached session is the client path, not the session's own frontend. @@ -140,13 +151,14 @@ session in `ps` is either its stub's child or a process of its own. ## Rex beside pardes From Rex's own help (captured under -`.scratch/sketch/reorg/pardes-plan/rex/`; nothing else of Rex was run). +`.scratch/sketch/reorg/pardes-plan/rex/`), and for the client row its +binary's strings (`/usr/sbin/rex` links libghostty); Rex was not run. | | Rex | pardes | |---|---|---| | Who holds the programs | one server an account holds every session and runs every program (`skill-show.txt`) | each session is its own process, with the truth; the daemon holds a dup of each pty master and a list | | What starts it | any command starts a missing server (`--autostart`) | the first session starts the daemon; what you start is the session | -| A client | "one program connected to the server" (`help-client.txt`): a view of the server's state | a process with a whole replica core: its own view, speculation, predicted echo | +| A client | "one program connected to the server" (`help-client.txt`); not a thin view: it replays the server's stream into its own libghostty and draws locally (the binary links libghostty; the help text does not say so, and this row first called it a view of the server's state: the user's correction, 2026-11-17) | the same principle, the stream shipped and the state derived where it is shown, into a whole replica core with its own view; what pardes adds is a client applying its own input before the session confirms it (speculation, rolled back when the session ordered things otherwise) and a predicted echo | | Attach | no user's verb; in the API "start receiving its events and get its current view" | today four mechanisms; after this note, one: a client | | The last client leaves | "the session keeps running" (`api-session.detach.txt`) | the same for a client; today a session's own frontend closing depends on its kind and the daemon | | Another machine | the same commands with `-S HOST` | `attach HOST:NAME`; a far session's 9P is not reached that way | @@ -168,9 +180,10 @@ session takes back. - `--detach` with no daemon starts a session nothing can attach to (`main.zig:1535-1537` ignores the failed registration). Refuse, or keep it as a 9P-only session? -- `pardes ps` says `attached` for a session with a frontend of its own. - After the change that frontend can only be the first one: keep the word, - or say `detached` / `with its frontend`? +- `pardes ps` says "has a frontend" for a session with a frontend of its + own (the daemon's list, and so /sessions, still says `attached`, a wire + word). After the change that frontend can only be the first one: is + "has a frontend" the word, or "with its first frontend"? - When: the order the user ruled is this vocabulary and the page first, and the code after sketchbook's steps land (`.scratch/sketch/PARDES.md`, ruling 4). |
