Repository navigation
Add id-only member scans - #22
Merged
Merged
Conversation
Callers that only need ids no longer pay for a Member record per member.
venkat1701
force-pushed
the
perf/member-id-scans
branch
from
October 4, 2026 08:18
325b66b to
cfcd788
Compare
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.
Closes #8
Adds
Hyperedge.memberIds()andReader.memberIds(edge), which return aLongStreamof member ids. Set edges read the membership tree keys directly; ordered edges read the incidences in position order. The Studio neighbourhood builder and the benchmark adapter now use it, since neither needs roles or weights.Honest result: the win is smaller than the issue assumed. On a 200k member edge (same JVM, interleaved runs, median of 5 after warm-up) a full scan goes from 9.4 ms with
members()to 6.9 ms withmemberIds(), about 27% faster. TheMemberrecord was not the main cost. Most of the remaining time is the tree cursor and decoding the leaves, so closing the gap with HyperGraphDB's array scan will need a keys-only leaf decode path. I can open a separate issue for that if you want.memberIdsFollowMembershipOrderinQueryLanguageTestchecks that the ids matchmembers()for set and ordered edges, including an ordered edge whose members aren't in id order. Full./mvnw installand the benchmarks module both build locally.