diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-29 14:27:42 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-29 14:27:42 -0300 |
| commit | 00c56a4ca3fd938ebec2933ca3308aadbe4da6af (patch) | |
| tree | 5b6a9c6eed213c8c40aa816f05b5c39a7ac79eba | |
| parent | 46c3c5db5a9a32ec6c43ad23ba041126ead5bd07 (diff) | |
| download | pardes-00c56a4ca3fd938ebec2933ca3308aadbe4da6af.tar.gz pardes-00c56a4ca3fd938ebec2933ca3308aadbe4da6af.zip | |
Store.zig: an output pane too big to keep is skipped before its dump, not after
Closing a 256 MiB +Pager base64'd and serialized its text (8.5 s in
Debug, the session answering nothing meanwhile) only to throw the record
away: an output pane's record always holds its text whole, so its length
decides first. fs.py's remove of that pane timed out on it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
| -rw-r--r-- | src/Store.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Store.zig b/src/Store.zig index 5e47d695..856a7fc1 100644 --- a/src/Store.zig +++ b/src/Store.zig @@ -498,6 +498,10 @@ pub fn keep(s: *Store, p: *Pardes, id: usize) ?Kept { const pane = p.panes[id] orelse return null; if (pane.fs.unannounced or pane.query != null) return null; if (pane.file) |f| if (f.output) |o| if (o.from == .preview) return null; + // An output pane's record holds its text whole (base64): one past the + // bound is known before a dump of it is made, which for a 256 MiB + // +Pager held the session up for seconds only to be thrown away. + if (pane.file) |f| if (f.output != null and f.content.len > max_record) return null; const gpa = p.recentGpa(); const arena = p.scratch.allocator(); var dp = dump.dumpPane(p, arena, pane) catch return null; |
