-
Notifications
You must be signed in to change notification settings - Fork 231
improved in out degree performance #2757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportBase: 92.29% // Head: 92.36% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2757 +/- ##
==========================================
+ Coverage 92.29% 92.36% +0.06%
==========================================
Files 264 264
Lines 25215 25254 +39
==========================================
+ Hits 23273 23325 +52
+ Misses 1942 1929 -13
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand, looks good enough to me, and quite a simple change in the code.
// outgoing edges | ||
//---------------------------------------------------------------------- | ||
|
||
// TODO: revisit once we get rid of MULTI-EDGE hack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we anticipate any changes regarding this "TODO" in this PR or later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably later down the road
removed unused `info`
* improved in out degree performance * Update graph.c removed unused `info`
* improved in out degree performance * Update graph.c removed unused `info`
* Fix type mismatch error message (#2691) * Add function SIType_ToMultipleTypeString() * Test type mismatch * Fix test_query_validation assert messages * Remove support to not used types * Remove last comma from list of types * Fix type mismatch test * work on comparison (#1923) * work on comparison * fix merge * simplify * add test * fix test * address review * work on comparison (#1923) * work on comparison * fix merge * simplify * add test * fix test * address review * More readable code * Fix SIType_ToMultipleTypeString() ASSERT() * SIType_ToMultipleTypeString() support to all types * Iterate over SITypes using currentType * Remove outdated comment * Switch to a stack allocated buffer * Use __builtin_popcount() * Fix test hasLabels() mismatch type * Use constant for buf size * Revert "Use constant for buf size" This reverts commit 69f34d5. * Remove bytesWritten arg * Use named constant for buffer size * SIType_ToMultipleTypeString() use 3 loops Co-authored-by: Avi Avni <avi.avni@gmail.com> * timeout fix (#2742) * timeout fix * Added a test * Fix printing of the cond-traverse and expand-into operations. (#2727) * Fixed printing of cond-traverse and expand-into * Added tests * WIP addressing comments * taking labels from corresponding AlgebraicExpression * fix profile test * Reverted previous changes * Addressing comments * WIP freeing memory * Fix leak * WIP leak fix * Leak fix * Fix crash. * Small fix * clean ups Co-authored-by: Victor Polevoy <fx@thefx.co> Co-authored-by: swilly22 <roi@redislabs.com> Co-authored-by: Avi Avni <avi.avni@gmail.com> * Inherit attribute set (#2751) * inherit attribute-set when creating a new node * fix build * clean Co-authored-by: swilly22 <roi@redislabs.com> * replicate command run on main thread (#2754) * replicate command run on main thread * address review * fix * improved in out degree performance (#2757) * improved in out degree performance * Update graph.c removed unused `info` * bump version 2.10.5 * Fix test * Update release.json (#2771) adding focal to enterprise qa * Update RS_VERSIONS (#2776) add cluster versions for release testing Co-authored-by: nafraf <nafraf@users.noreply.github.com> Co-authored-by: Avi Avni <avi.avni@gmail.com> Co-authored-by: Victor Polevoy <fx@thefx.co> Co-authored-by: swilly22 <roi@redislabs.com> Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> Co-authored-by: TomerHekmati <72793005+TomerHekmati@users.noreply.github.com>
* UNWIND an expression that is not a list (#2650) * _initList: Create list for not list values * Add test_unwind_clause.py * tck test unwinding null * Fix unwind tests * Fix test unwind null Co-authored-by: Avi Avni <avi.avni@gmail.com> * Allow update properties to NULL (#2665) * Allow update properties to NULL * Test remove null attribute MERGE ON CREATE SET * Fix Duplicate reports when matching relationship type :R|R (#2674) * _QueryGraphAddEdge don't add duplicated reltypeIDs * Prevent duplicated reltypes when no schema found Co-authored-by: Avi Avni <avi.avni@gmail.com> * add reference entities in unwind (#2692) * fix crash using freed values (#2695) * fix crash using freed values * add comment * bug fix validate MERGE SET property: issue: 2637 (#2684) Co-authored-by: Avi Avni <avi.avni@gmail.com> * fix crash of aggregation function in reduce (#2696) * remove old parameter syntax (#2697) * remove old parameter syntax * fix test * fix tck * fix * Fix optimize-label-scan (#2711) * Replacement AlgebraicExpression fixed to original label * Added test * Added comments * Update test_optimizations_plan.py * Update optimize_label_scan.c Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> Co-authored-by: Avi Avni <avi.avni@gmail.com> * Updated readies (fix for getpy3 on xenial) (#2720) * timeout fix (#2742) * timeout fix * Added a test * replicate command run on main thread (#2754) * replicate command run on main thread * address review * fix * improved in out degree performance (#2757) * improved in out degree performance * Update graph.c removed unused `info` * bump version 2.8.21 * cp fixes * Update release.json (#2771) adding focal to enterprise qa * leak fix * leak fix2 * leak fix3 * Update RS_VERSIONS (#2776) add cluster versions for release testing * leak fix * test fix Co-authored-by: nafraf <nafraf@users.noreply.github.com> Co-authored-by: Avi Avni <avi.avni@gmail.com> Co-authored-by: OfirMos <82366525+OfirMos@users.noreply.github.com> Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> Co-authored-by: Rafi Einstein <raffapen@outlook.com> Co-authored-by: TomerHekmati <72793005+TomerHekmati@users.noreply.github.com>
* improved in out degree performance * Update graph.c removed unused `info`
#2753
MATCH (a) RETURN outDegree(a), inDegree(a)
Previous implementation would extract
a's
incoming / outgoing edges into an array just to get its length and soon after discard it which is a waste. This new implementation doesn't extracts any edges but simply counts.FYI with @AviAvni new design of NxM Relation matrices (N #nodes, M #edges) we get rid of Multi edge arrays and can simplify this change to a straight forward row reduction.
Quick benchmark:
Compute out degree of a node with 1M outgoing edges
This PR 0.2ms
Current
Master
20ms100X improvement