aboutsummaryrefslogtreecommitdiffstats
path: root/prototypes/connections/module.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-26 21:54:49 +0100
committereunhhu <[email protected]>2026-09-26 21:54:49 +0100
commitd693cc750b75b2d862614b6f79f81a311f6294ca (patch)
tree71588161adc22f5791ce38becf1df650b92501da /prototypes/connections/module.h
parentcb23514a5a2b00f635444d0e98a429419e6a67b4 (diff)
downloadpure-d693cc750b75b2d862614b6f79f81a311f6294ca.tar.gz
pure-d693cc750b75b2d862614b6f79f81a311f6294ca.zip
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.
Diffstat (limited to 'prototypes/connections/module.h')
-rw-r--r--prototypes/connections/module.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/prototypes/connections/module.h b/prototypes/connections/module.h
index c3edc54..313c6e1 100644
--- a/prototypes/connections/module.h
+++ b/prototypes/connections/module.h
@@ -148,6 +148,9 @@ int pure_module_column(const PureModule *, uint32_t table, const char *name);
/* The index state a number view shows as its position (a view that is just
* `at.position`), or -1: what a host moves with pure_app_point. */
int pure_module_position(const PureModule *, uint32_t view);
+/* The text state a text view shows as it is (a view that is just the
+ * state), or -1: a host may lend its stored extents instead of copying. */
+int pure_module_text_state(const PureModule *, uint32_t view);
/* Keyed collections live in a data host (for example the tree store). One
* event opens at most one document, the message's key, at its current