From ad27f1f5a4fc7a53d116feb9b1e2352239147fe0 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 27 Sep 2026 23:38:54 +0100 Subject: Let a runtime-owned state grow past the document limit A list's stored form is one value in the tree store, so the limit on a document (1.38 MiB, what a host carries whole as an HTTP body) capped a table at about 51,000 rows of 28 bytes. A value the runtime owns, a state (a key starting with '.') or a draft without a key, may now grow to 1 GiB; documents keep their limit. The store's format is unchanged: its trees already reach far past either. --- core/store.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/store.h') diff --git a/core/store.h b/core/store.h index dbfa8f8..64b8d9e 100644 --- a/core/store.h +++ b/core/store.h @@ -5,6 +5,11 @@ #include #define PURE_OBJECT_LIMIT ((2u * 6u + 32u) * 32768u + 8192u) +/* A document (what a host carries whole, as an HTTP body) is at most + * PURE_OBJECT_LIMIT bytes. A value the runtime owns (an app's list or text + * state: a key starting with '.', or a draft without a key) may grow to + * PURE_STATE_LIMIT: a table of a million rows is one such value. */ +#define PURE_STATE_LIMIT (UINT64_C(1) << 30) typedef struct { void *mapping; size_t mapped_size, object_size; -- cgit v1.2.3