summaryrefslogtreecommitdiff
path: root/core/plumbing
Commit message (Collapse)AuthorAge
* changes layer: a file with no layer pays for it what tree6 paid, found by ↵Gabriel Schneider4 days
| | | | | | | measure (instructions by symbol and by source line, Intel PT, on the ReleaseFast pardes-perf, tree6 against round 9's base): perfops against tree6 from 12 of 121 over 0.1% to 1 (the base's `body-appends` +0.44%, `open` +0.235%, `client-key-down` +0.13..0.16%, `client-delete-undo`, `client-edit-char`, `deep-sel` +0.10..0.14%, every frame +3.8k); (1) `File.fillBody`'s row walk compiled worse with the gutter number's layer lookups (`readOnlyRow`, `fileRow`) inlined beside it: PT by source line, tree6's lines matched to the base's by their text, the same bytes walked, the inlined `fitEnd` byte loop +98k an op with no line and its checks reshuffled (body-appends +86k an op): `fillBody(comptime layered)`, as tree6's `comptime ghosted` was, chosen by `mapRows` and `bodyText` (a length test); (2) the 9P path asked the file's text and its offsets through calls: `bodyOf`, `fileDot`, `setFileDot`, `showFileOffset` answer with no layer by a length test, inline (core/ninep/pane.zig); (3) `open` (+8.8k since tree6, step 1's): not the change-id rule's regexp (it stands after the file rules and is never reached for a file) but its PARSE: pardes-perf's open boots a core each time and each core reads the rules at its first plumb (`Plumb.Parser.take` +4.0k, `expand` +1.4k, `feed` +1.2k, `endSet`, `word`, `append`, `stringToEnum`: +8.6k): the rule is deleted from core/plumbing and Look's own unresolved path takes a change id (core/look.zig `lookUnresolved`: eight letters or more, k to z, in a pane neither a raw terminal's nor a kind's, the rule's `src is pardes`; `jj.diffChange`; one naming no change searched for as before), no rule and no parse anywhere; (4) a client's key (+2.0..2.4k): the digest of File.State's two new fields, two small hash updates a pane a digest (Wyhash's buffered update and its memcpy): one field, `layer: Layer` (`owner`, `lines`: what were `layer` and `read_only`), digested by hand (`Layer.digest`: nothing hashed with no layer shown, a length test), its line in replica.zig's `hand_walked` (the test joining a client over a pane showing the layer); LEFT FOR THE COORDINATOR'S RULING: `terminal on all` +0.141% (+147k an op over the 18 terminal cells, +7.8k a terminal frame, the same in-run by an in-process counter around each cell): PT by line in the terminal's render cell: core/ansi.zig `recolor`'s per-cell style loop (source unchanged) compiled worse inlined into `body_layer.renderBody` after round 8's deletions there (`w.ghost`'s skips, `Pane.wrapAt`'s `ghost` field): what it buys is those deletions; `@call(.never_inline, ansi.recolor)` made it worse (+0.227%, and `deep-sel` +0.285%), not kept; perfops (the gate's malloc setting, load 2-9): v4 against tree6 120 of 121 within 0.1%, largest under the budget `client-key-down` on medium +0.065%; core-test 952/1118 (166 skipped) Debug tui Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* changes layer: a Look on a jj change's id opens its patch, its header and ↵Gabriel Schneider4 days
| | | | | | | whole message at the top, and a Look on a ghost row looks at its word as anywhere (the user's rulings of 2026-11-23: all text is text; a patch of one change opens with its metadata): a word of k to z letters had no meaning to a Look (searched), `Diff` took only a git hash, and a B3 on a ghost row was a button of its own (`lookGhost` opened the line in the revision it came from); now `Diff <change> [path[:line]]` (core/jj.zig `diffChange`, from hunks.zig's word) runs `jj show --git -r change_id(<change>)` in the pane's repository (on the tape, as `At`'s `jj file show`), stacks it in the change's own `+Diff-<commit>` with jj's header above the hunks (Commit ID, Change ID, Author, Committer, the whole message) and puts the cursor on `path`'s row for `line` (that file's first row without one, the top without a place; a second Look moves the open one); a plumbing rule sends a change id looked at in any pane (eight to thirty-two letters k to z, as `jj log` writes them: four would name a change by accident too often) to `Diff`, which declines a word that names no change, so it is searched as before; a B3 on a ghost row looks at the word under it (`wordAt`, then the regular `look.lookAt`), and on a description's id runs `Diff <id> <path>:<line>` with the line of that change's last hunk in this file, the text a user could type; tests: "a Look on a change's id opens its patch ..." (B3 on mid's description id in a terminal and a window: a `+Diff-` pane, its first lines jj's header, ` mid` in it, the cursor on a.zig:4; the same typed with a.zig:2; `Look <cut's id>` from the file: cut's patch at its top; `Look zzzzzzzz`: no patch), the ghost-row test's Look now asserts a B3 on `c();`'s ghost row is what `Look c` does (no revision opens), and hunks.zig's "a log of several changes keeps each one's header and whole message above its own hunks" (git log -p: each commit's header above its own hunks: it passed on the base: the format keeps them); core-test 927/1091 (164 skipped), shell-test 1133/1136 (3 skipped) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* core: src/ becomes core/, pardes.zig its root.zig (the reorganisation's ↵Gabriel Schneider9 days
tree, step 2d), and every mention of a src/ path follows: the build's paths, the core's imports of its root, the tests that read the repository's files by path (lspbench's, look.zig's spans over core/look.zig), the comments that cite files, the documents and the manual (the typst corpus reads core/tutor.txt and core/plumbing); left as they were: the /src tree's served names (src/pardes.zig and the rest are the 9P tree's, not the repository's), the CHANGELOG's history, fixtures that are only strings; fs-unit-test runs from the core's root (a module of the core rooted at fs.zig had the runtime's and the devices' `core` be fs.zig); nothing else changes: the ledger (pardes.test.* now root.test.*), frames byte-identical, replicas and process-test the base's Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T