Skip to content

Update v8 SNAPSHOT release, optimization - #129

Merged
theronic merged 2 commits into
v8.0.0-SNAPSHOTfrom
main
Aug 17, 2026
Merged

Update v8 SNAPSHOT release, optimization#129
theronic merged 2 commits into
v8.0.0-SNAPSHOTfrom
main

Conversation

@theronic

Copy link
Copy Markdown
Owner

No description provided.

Petrus Theron and others added 2 commits August 18, 2026 00:33
Adapter scans are ordered lazy sequences from the exclusive bound to the
end of the endpoint. Since the physical layer was wired onto the routed
engine (92c76be), classified-fetch-fn realized the WHOLE remainder with
`vec` on every command, and only then did the reducer keep its physical
chunk of 64. Every scan command therefore re-read the endpoint tail:
walking an endpoint of degree n cost about n^2/128 realized values
instead of n, and a 20-result first page realized the entire endpoint.

The boundary now realizes exactly the descriptor's `:limit` (the reducer
always sends its physical chunk size); descriptors without a limit keep
realizing the complete scan. Released values, `more-physical?`, work
counters, order and pages are unchanged by construction: the reducer
already truncated to the same chunk. Atomic partial-output discard and
retry semantics are unchanged because the chunk is still realized inside
the try.

Measured on the local million-server Datomic demo (recursive schema,
warm second peer, single runs): count-resources for user-1 (24,024
results) realized 1,079,996 -> 96,188 scan values; a 30,000-limited
super-user count 1,292,809 -> 114,337 (1,113 -> 730 ms); super-user
first page of 20 realized 568 -> 128 values (15.7 -> 8.6 ms). On a
synthetic DataScript endpoint with 8,000 direct subjects an exhaustive
count realized 504,000 values before and at most 8,064 after.

Regression test: routed-reads-realize-only-the-requested-chunk-test
(fails 6 assertions under the previous behaviour). CI-equivalent
battery 659 tests / 26,510 assertions green; DataScript CLJS 203 / 7,428
green; public-source-closure ledger regenerated.
…ization

Realize only the requested chunk inside the classified read boundary
@theronic
theronic merged commit 23a0c67 into v8.0.0-SNAPSHOT Aug 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant