Conversation
Eager-vs-lazy tradeoff in the InducedSubgraphView spirit: the view is immutable, so cached aggregations never invalidate within a level. - ensureEagerCache() materializes supernodes whose estimated work (member degree sum) exceeds eagerNeighborThreshold, in parallel, once per level; wired into ParallelLeidenView after each new view is created. - computeNeighbors() lazily promotes any other hot supernode on first visit. - Per-entry mutexes keep it thread-safe; threshold tunable via NETWORKIT_LEIDEN_EAGER_THRESHOLD (0 = cache all, none = lazy only).
adsharma
added this pull request to stack #79
September 14, 2026 21:56
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.
Stacks on #77 (flat sort-combine + phase shrink). Adds an adaptive eager neighbor cache: hot supernodes materialized once per level via ensureEagerCache(), cold ones stay lazy with promotion on first hot visit. View immutability means no invalidation logic. Threshold via NETWORKIT_LEIDEN_EAGER_THRESHOLD (default 2048, 0 = all, none = off).
Tests: networkit_tests eiden:oarsen:nducedSubgraph 46/46 passed.