From d693cc750b75b2d862614b6f79f81a311f6294ca Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sat, 26 Sep 2026 21:54:49 +0100 Subject: Lend a text state's stored extents for its view (079) A view that shows a text state as it is (pure_module_text_state) now goes out as the state's stored extents, as a document read does: the answer holds the store mapping, charged to the budget, until it is sent and its ticket released; a state with edits not yet stored is copied as before. Documents and views share one loan path, and the extent array grows as needed. A 1 MiB note read by 8 connections: 776-817 answers a second copied, 1,875-1,901 lent, p50 9.2 to 3.5 ms, peak RSS 10.3 to 5.7 MiB. The load generator learns GET /views/page. --- prototypes/connections/state.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'prototypes/connections/state.h') diff --git a/prototypes/connections/state.h b/prototypes/connections/state.h index 0945475..43489c1 100644 --- a/prototypes/connections/state.h +++ b/prototypes/connections/state.h @@ -34,8 +34,8 @@ PureResult pure_store_state(PureStore *, const char *name, PureDraft **out); * reference to the mapping a draft opened through a handle reads its stored * nodes from (NULL for other drafts). Spans that mapping holds stay readable * until the reference is released, after the draft closes and after the - * store moves on. Spans of a draft's unsaved edits are not in it. Use it on - * the handle's owner thread. */ + * store moves on. Spans of a draft's unsaved edits are not in it. Take it on + * the handle's owner thread; the reference may be released on any thread. */ typedef struct PureMapping PureMapping; PureMapping *pure_draft_mapping(const PureDraft *); bool pure_mapping_holds(const PureMapping *, PureSpan); -- cgit v1.2.3