From aac802c58937053a200b0392843195b128a21172 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 23:55:35 -0300 Subject: pdf: every by-value copy of a pane's PDF state (about 39 KB, its 256 raster slots) taken to read a field or two is a pointer capture, in panes, edit, mouse, tagline, look, exec, the core, 9P ctl, fs, draw, macos and the sections bench; the hot one is pdf_view.moving, which Pardes.continuous asks on every pass of the shell loop and which copied every PDF pane's state each time Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/fs.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fs.zig') diff --git a/src/fs.zig b/src/fs.zig index 207f1018..3e80fc1b 100644 --- a/src/fs.zig +++ b/src/fs.zig @@ -1481,7 +1481,7 @@ pub fn unmount(p: *Pardes, name: []const u8) !void { const pane = slot orelse continue; const paths = [_][]const u8{ if (pane.file) |file| file.path else "", - if (comptime pardes.pdf_enabled) (if (pane.pdf) |pdf| pdf.path else "") else "", + if (comptime pardes.pdf_enabled) (if (pane.pdf) |*pdf| pdf.path else "") else "", if (pane.image) |image| image.path else "", Pardes.paneDir(pane), }; -- cgit v1.3