Repository navigation
perf(engine): avoid pending maps for selective ancestor joins (#723) - #785
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.
An in-memory ancestor query currently builds a value map of every pending edge when a recursive delta runs first. Eligible three-pattern delta runs now retain an alternative that starts from a small derived relation and probes edges by entity. Both orders use the same semi-naive ranges, and the alternative is refused if it could change the rule value head’s keyword/ref representation.
For #723, the existing
recursion/ancestors/w10_d4benchmark improves from 15.05 ms to 0.297 ms; a second pair gives 14.49 ms to 0.286 ms (about 50×). The depth-100 chain and fanout controls show no significant change; the depth-10 chain regresses by about 4%. Full measurements and raw Criterion output are indocs/BENCHMARKS.mdanddocs/benchmarks/723-recursive-joins.txt.The runtime choice is limited to an empty committed dictionary, at most 128 source relation rows with no stored records, and an uncached pending value map whose capped record count favors entity probes. Populated committed generations retain AVET probes. There is no new storage index, dependency, API, or file format.
Validation on the bench machine:
The maintainer approved raising the v3 binary-size cap from 1,230 to 1,234 KiB. With the same toolchain and lockfile, the release binary grows from 1,258,712 to 1,261,432 bytes (+2,720), below the new 1,263,616-byte cap. The workflow, PHILOSOPHY.md and benchmark report record the increase and rationale.