diff options
| author | eunhhu <[email protected]> | 2026-09-25 09:34:34 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-25 09:34:34 +0100 |
| commit | 65386f68fb53e5a9a20a284b06afd872172c30eb (patch) | |
| tree | b04133aaa602fbf6a864df1d368ae091ab09b600 /README.md | |
| parent | 6a28879bd56354483fe940c0c80d511eccb89983 (diff) | |
| download | pure-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 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -79,6 +79,15 @@ unchanged runtime, splice, async and real-PTY TUI checks pass on it larger, contiguous reads of multi-leaf documents copy, and space is reclaimed only by compaction, so it remains an opt-in profile. +On that store the runtime can own an app's working version +([drafts](docs/research/074-runtime-owned-drafts.md), `state.h`). A draft +shares unchanged extents with the stored version, lends ordered extents +without copying, and commits only its new nodes. Typing into the middle of a +1 MiB document and saving each character peaked at 1,648–1,664 KiB RSS with +drafts. An app copy that is compared with storage on save peaked at +4,464–4,496 KiB. Saves were only about 1–2 ms faster; drafts are not yet +exposed to `.pure` definitions or charged to the runtime budget. + The current execution profile has separate `core`, `fixed-editor`, `editor`, and `server` build targets. `make all` produces the core and the parser-free CLI from the build-time prepared `editor.pure`; it also builds a compiler tool that |
