aboutsummaryrefslogtreecommitdiffstats
path: root/docs/research/045-owner-thread-async-effects.md
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-25 09:34:34 +0100
committereunhhu <[email protected]>2026-09-25 09:34:34 +0100
commit65386f68fb53e5a9a20a284b06afd872172c30eb (patch)
treeb04133aaa602fbf6a864df1d368ae091ab09b600 /docs/research/045-owner-thread-async-effects.md
parent6a28879bd56354483fe940c0c80d511eccb89983 (diff)
downloadpure-65386f68fb53e5a9a20a284b06afd872172c30eb.tar.gz
pure-65386f68fb53e5a9a20a284b06afd872172c30eb.zip
Let the runtime own working versions as drafts
state.h gives any app a runtime-owned working version of a stored value on the tree store. A draft shares unchanged extents with the stored version, edits in memory by path copying, lends ordered extents without copying, and commits only its new nodes when the key is still at its base revision. A failed commit changes neither the draft nor the store; a draft whose file was replaced by compaction copies its stored extents on commit. Unreachable arena nodes are reclaimed once they outweigh max(reachable, 32 KiB). Typing into the middle of a 1 MiB document and saving each character peaked at about 1,660 KiB RSS with a draft against about 4,480 KiB for an app copy compared with storage on save; saves were only 1-2 ms faster. This corrects 073, which had attributed the TUI's remaining 8 ms to that comparison. Drafts are not yet charged to the runtime budget or visible to .pure definitions.
Diffstat (limited to 'docs/research/045-owner-thread-async-effects.md')
0 files changed, 0 insertions, 0 deletions