Repository navigation
perf(engine): cache narrow entity probes in recursive joins (#672) - #782
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #672.
Type of change
Validation
On the benchmark machine, the 4,882,500-row
reach_5mquery fell from 302.66 s to 70.91–74.40 s; added peak RSS was 165–172 versus 172 bytes per derived fact. Across four paired 1M envelope rounds, recursive p50 fell from 2,808.89 to 2,761.06 ms (1.7%); point lookups remained around 18 µs. Envelope process peak RSS varied between pairs; the raw runs and commands are indocs/BENCHMARKS.md.On current
v3, the bench-machine engine suite passed (73 tests, 2 ignored), and the 5M acceptance passed with 4,882,500 rows in 69.87 s and 172 added RSS bytes per fact. The release binary is 1,258,712 bytes, 808 bytes under the gate. All PR checks are green, includingtest-hooks, coverage, MSRV, native/browser/WASI clippy, Linux/macOS/Windows builds and tests, browser/WASI tests, docs, and the size gate. Claude reviewed the spec, plan, and code, including the rebased engine. Its questions about recursive rounds, meter release on rewind, and provisional entity IDs were checked against the current implementation.Checklist
cargo testpasses on the rebased branch (test-hooksCI and focused bench-machine suite)cargo clippy -- -D warningsis clean on the rebased branchcargo fmt --checkpassesunwrap()/expect()in new library pathsCHANGELOG.mdupdated underUnreleasedPHILOSOPHY.md: an embedded, bounded, metered performance improvement with no file-format or public API changeNotes for reviewer
The cache is optional under a tight query memory limit; a refused entry continues through the existing streaming path. The benchmark baseline (
d0ad89c1d) predates the three #641 slices now onv3; the rebased branch passed the 5M acceptance and size gate separately.