-
Notifications
You must be signed in to change notification settings - Fork 6
Feat: support adding multiple nodes/branches at once (performance increase) #31
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
Signed-off-by: Thijs Baaijen <[email protected]>
Signed-off-by: Thijs Baaijen <[email protected]>
Signed-off-by: Thijs Baaijen <[email protected]>
Signed-off-by: Thijs Baaijen <[email protected]>
Signed-off-by: Thijs Baaijen <[email protected]>
Signed-off-by: Thijs Baaijen <[email protected]>
|
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.
Nice performance improvement 👍, in general it looks good. I have some open questions
Signed-off-by: jaapschoutenalliander <[email protected]>
Co-authored-by: Jaap Schouten <[email protected]> Signed-off-by: Thijs Baaijen <[email protected]>
DCO Remediation Commit for Thijs Baaijen <[email protected]> I, Thijs Baaijen <[email protected]>, hereby add my Signed-off-by to this commit: b1601a8 I, Thijs Baaijen <[email protected]>, hereby add my Signed-off-by to this commit: 0598eb8 I, Thijs Baaijen <[email protected]>, hereby add my Signed-off-by to this commit: 82d52f9 Signed-off-by: Thijs Baaijen <[email protected]>
|
Signed-off-by: Thijs Baaijen <[email protected]>
|
rustworkx
supports adding multiple nodes/branches at once. This is much faster than one by one.I've updated the code to support this.
benefits
Should increase performance of methods like
Graph.from_arrays
andGrid.from_cache
side-effects
Introduces some breaking changes as some methods on the
BaseGraphModel
have been renamed:add_node
->add_node_array
add_branch
->add_branch_array
add_branch3
->add_branch3_array
On the other hand, I don't expect this to break much in existing projects, because in general the
Graph.add_branch
andGraph.add_node
functions are not directly used (e.g.,Grid.append
andGrid.add_node
are used instead)Performance comparison
Existing code (main):

New code:
