From 65386f68fb53e5a9a20a284b06afd872172c30eb Mon Sep 17 00:00:00 2001 From: eunhhu Date: Fri, 25 Sep 2026 09:34:34 +0100 Subject: 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. --- prototypes/connections/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prototypes/connections/Makefile') diff --git a/prototypes/connections/Makefile b/prototypes/connections/Makefile index 661fbcd..a416bee 100644 --- a/prototypes/connections/Makefile +++ b/prototypes/connections/Makefile @@ -11,7 +11,7 @@ HOST = $(STORE) store-port.c evaluate.c # Document browsers list keys through the store. The tree store keeps its own # catalog; per-object file stores share a directory listing. KEYS = $(if $(filter store-tree.c,$(STORE)),,store-keys.c) -HEADERS = runtime.h program.h store.h store-port.h flow.h result.h +HEADERS = runtime.h program.h store.h store-port.h state.h flow.h result.h all: core fixed-editor core: $(BUILD)/libpure-execution.a async-core: $(BUILD)/libpure-execution-async.a -- cgit v1.2.3