From 3350156db428656fa8e583d1971663e1c4a215b0 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 18 Nov 2026 05:48:27 -0300 Subject: image: the image kind runs where its pane is shown (PA_PLAIN): its block is the file's size as it says, the same bytes in every process, and each process decodes the file on a draw of its own and keeps the RGBA beside the block (by its address) for its paint alone, so a client draws the picture itself and the session sends nothing for the pane (no Shadow, no decoded pixels in a job's answer on the tape); a plain kind's code is loaded in a client at its first pane, not at the join (Addon.need; a client with no picture or game maps no addon library); a client that joins late opens a plain kind's pane from its file, which the join's dump carries, read from the disk then (SlotRecord.file: paid only at a join), and one it cannot open shows the line; a client's join with a picture and a PDF open reads 10.70 MB -> 7.36 MB, its picture the session's pixel for pixel, its memory 269.1 -> 272.5 MB RSS (184.2 -> 187.6 PSS); with no client perf --only medium 2,279.68M -> 2,279.60M instructions:u, pdf-scroll-bench 18,392-18,399M -> 18,397-18,402M (its visual hashes the same), start to the first frame 53.6M (terminal) and 392-411M (window) as before; tui core-test 819/958 (139 skipped), shell-test 993/996, behaviour-test 273/273, --replay 20 seeds 0 failures, pane-test 180/181 (the picture's tag test steps the core, as no job's event does now), replicas pass, addon-test 1/1, process-test 2 of 144 failed (lspcomplete and lspcompletemoved, the base's), image-harness passes, test/daemon.py, --far, --games (keys stopped 0 and 0 of 453 and 452) and --window-clients pass; gui unit-test 1586/1590 (4 skipped; the perf check's BaselineBuildMismatch, the base's), the frame corpus 77/77 against mbase, pdf-harness CaptureColorMissing as on the base Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- src/replica.zig | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/replica.zig') diff --git a/src/replica.zig b/src/replica.zig index f84e61e8..b1b0514c 100644 --- a/src/replica.zig +++ b/src/replica.zig @@ -762,12 +762,14 @@ pub const Replica = struct { const c = try pardes.dump.load(epoch, o, bytes, null); // The chrome's colours are local, never dumped: the restored theme's. pardes.colors.finishThemeInitialization(c); - // It runs a plain kind's code of its own (Addon.plainOps), each pane - // of one opened here from its record; another's panes are Shadows. - for (c.kinds.kinds[0..c.kinds.n], c.kinds.ops[0..c.kinds.n]) |*e, *ops| ops.* = pardes.Addon.plainOps(e); - @memset(c.kinds.ops[c.kinds.n..], null); - for (c.panes, 0..) |pslot, at| if (pslot) |pane| if (pane.addon) |s| if (c.kinds.byName(s.nameOf())) |k| if (c.kinds.ops[k]) |ops| { - pane.addon = try pardes.dump.plainHere(c, at, s, ops); + // It runs a plain kind's code of its own (Addon.plainOps), loaded + // at its first pane, each opened here from its record; another's + // panes are Shadows. + c.kinds.ops = @splat(null); + for (c.panes, 0..) |pslot, at| if (pslot) |pane| if (pane.addon) |s| if (c.kinds.byName(s.nameOf())) |k| { + if (c.kinds.ops[k] == null) c.kinds.ops[k] = pardes.Addon.plainOps(&c.kinds.kinds[k]); + // Refused (its file not here): the line saying it does not run here. + if (c.kinds.ops[k]) |ops| pane.addon = pardes.dump.plainHere(c, at, s, ops) catch s; }; // What loading queued (a watch, a theme asked for) is the // authority's errand, done there already: the session was dumped -- cgit v1.3