feat: performance improvement in GraphX CDLP#681
Merged
SemyonSinchenko merged 1 commit intographframes:masterfrom Sep 13, 2025
Merged
feat: performance improvement in GraphX CDLP#681SemyonSinchenko merged 1 commit intographframes:masterfrom
SemyonSinchenko merged 1 commit intographframes:masterfrom
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #681 +/- ##
==========================================
+ Coverage 82.74% 87.57% +4.83%
==========================================
Files 28 61 +33
Lines 1327 2688 +1361
Branches 159 290 +131
==========================================
+ Hits 1098 2354 +1256
- Misses 229 334 +105 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
james-willis
approved these changes
Sep 12, 2025
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.
What changes were proposed in this pull request?
Instead of merging mutable maps on each reduce step (that leads to the complexity$O(n^2)$ ) we can just concatenate vectors ( $O(n)$ overall) and do a groupby once ( $O(n)$ ). Memory usage will also decreased, because on the first iteration of the current implementation we have $O(2n)$ ). On my tests it is 70x performance boost and less memory consumption (see #360)
Map(vertex -> 1L)for all the vertices, but with a new implementation the peak memory usage isVectorof all vertices. Concatenations of vectors is (almost) constant, vectors required 5x less memory for the same amount of elements inside compared to Maps. And there is no need to create mutable Map on each step, concatenate all the keys and iterate (Why are the changes needed?
Potentially resolve #360