summaryrefslogtreecommitdiff
path: root/docs/ideas.typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-29 23:14:10 -0300
committerGabriel Schneider <[email protected]>2026-10-29 23:59:54 -0300
commitbce88593014a4078dc9259855944f9ddbc19fe54 (patch)
tree9be0950d36a63cec15552dccec3cd29550b2f26c /docs/ideas.typ
parentc02ab55482c055c57146b9ea9a5a78c20bcdf122 (diff)
downloadpardes-bce88593014a4078dc9259855944f9ddbc19fe54.tar.gz
pardes-bce88593014a4078dc9259855944f9ddbc19fe54.zip
views and the rollback copy: a live view's slot keeps no pointer into what the live core owns; a register's texts and a file's location rows are pinned, not copied
views.zig: when a view goes live (to, close, drawOthers putting the live one back, only), its parked share is emptied (`emptied`): it was left holding copies of the pointers it handed the live fields (a column tag's text, a chord's argument, the presentation's), stale until it parked again. The rollback copy walks every slot: a stale pointer whose memory the live view had freed and another taken saved that other's bytes and put them back. A pane's share holds no pointer but its selections, which `unpark` already hands over. The test fails without it: a tag's text freed under view 0's stale slot, its memory taken by an allocation the copy has no business with, written under a held copy, and the copy put back. Registers.zig, locations.zig, rollback.zig: a register's values and joined text, and a file's location rows (the dropped ones, a query's saved), are replaced whole and never written, so the copy pins them as it does a file's text, freed raw (a safe build's free would write over one a copy still holds); rows pin whole with what each owns (`pinnedDeep`). In the harness at 30 ms the big copies were a file's location rows, 5-6 MB after the flood, not the register. ReleaseFast, 20 seeds, three clients, p99: copy 5.1 -> 0.22 ms at 30 ms (0.19-0.20 at 80 and 207); rollback 14.9 -> 9.5 ms at 30 ms (1.3-1.4 at 80 and 207), what is left being the replay's digests (half the harness's CPU is Wyhash over the whole core per replayed unit). Tests: a 2 MB register and 500 location rows pinned, not saved, and whole after a speculation drops them and the copy is put back. docs/next-daemon.md: the follow-ups. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/ideas.typ')
0 files changed, 0 insertions, 0 deletions