perf(exec): CSR-native adjacency without HashMap expansion (#340) - #490
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (5)
WalkthroughThe change introduces CSR-native adjacency views, bounded delta overlays, lazy undirected row merging, and CSR-backed algorithm graphs. It updates traversal access, public exports, persisted loading, scan fallback, projections, and related tests. ChangesCSR-native adjacency execution
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Execution
participant Adjacency
participant CsrIndex
participant CsrDeltaOverlay
participant AlgorithmGraph
Execution->>Adjacency: resolve adjacency backing
Adjacency->>CsrIndex: read native CSR row
Adjacency->>CsrDeltaOverlay: read affected overlay row
CsrDeltaOverlay-->>Adjacency: return base or replaced row
Adjacency-->>AlgorithmGraph: provide ordered NeighborRow
AlgorithmGraph-->>Execution: traverse CSR-backed graph
Possibly related issues
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
cursor
Bot
force-pushed
the
cursor/340-csr-native-execution-c6a4
branch
from
August 10, 2026 00:21
bfd5f5e to
fec43e0
Compare
cursor
Bot
changed the base branch from
cursor/336-stream-adjacency-build-c6a4
to
main
August 10, 2026 00:21
cursor
Bot
force-pushed
the
cursor/340-csr-native-execution-c6a4
branch
from
August 10, 2026 00:32
fec43e0 to
d7bb07d
Compare
This comment has been minimized.
This comment has been minimized.
Closes #340 Introduce CSR-native adjacency views with O(1) row lookup, bounded delta overlays that retain the base CSR, and CSR-style analyst projection storage so index hits no longer expand the complete valid CSR into per-node hash maps. Co-authored-by: David Spencer <DecisionNerd@users.noreply.github.com>
Closes #340 Document CSR-native execution honestly in scale-limits and architecture, and apply clippy fixes after the adjacency rewrite. Co-authored-by: David Spencer <DecisionNerd@users.noreply.github.com>
Local `bazelisk test //crates/graphforge-storage:graphforge_storage_test` passed; prior CI WriterBusy failure looks load-flake under parallel suite. Co-authored-by: David Spencer <DecisionNerd@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/340-csr-native-execution-c6a4
branch
from
August 10, 2026 01:38
10f0fbb to
017ec94
Compare
This was referenced Aug 10, 2026
This was referenced Aug 15, 2026
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
Consume persisted CSR through borrowable CSR-native adjacency views so traversal and analyst paths no longer expand the full base index into
HashMap<u64, Vec<_>>.Rebased onto
mainafter #336+#338.Changes
Adjacencywith O(1) row lookup; directed / undirected / delta overlay without copying the base CSRTesting
Closes #340
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Replace HashMap-backed adjacency with CSR-native row access in graphforge-exec
AdjacencyInnerenum (Empty,Map,Csr,Overlay,Undirected) instead of expanding the base CSR into aHashMapon every persisted hit.NeighborRowas a uniform, allocation-free iterator over neighbor entries regardless of backing (CSR, delta overlay, or HashMap).CsrDeltaOverlaythat replaces only touched rows while serving untouched rows directly from the baseCsrIndex, avoiding a full CSR copy.merge_undirected_rowrather than materializing a combined map.AdjacencyGraphinalgorithm_graph.rsis refactored fromHashMap<u64, Vec<AlgorithmEdge>>to flat CSR arrays (neighbor_row,neighbor_offsets,neighbor_edges); external method contracts are unchanged.Adjacency::neighborsnow returns aNeighborRowinstead of a slice reference; callers must use.iter()or.get().Macroscope summarized 017ec94.
Summary by CodeRabbit
Performance
Reliability
Compatibility