-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Performance Issues #195
Comments
I have to admit, I have never tested this lib on graphs this large. So, unsurprisingly, the very handcrafted and probably far from optimal cycle detection does cause these performance issues (although I guess there are a lot of other things that aren't really optimized for large graphs). If you only need the cycle checking, it's probably best to not use the engine plugin and instead provide your own plugin that does the cycle check on the It's probably too late for Baklava v1, but for v2 I'll try and also consider performance on larger graphs when implementing logic like this. |
Haha yes, we are pushing it to the limit. Thanks for the response, I agree it looks like we should just remove the engine plugin (I thought we were using it for other things, but upon second inspection it looks like it was legacy perhaps on our side). One issue is, even if we do write our own cycle check detection plugin (which would make adding new connections much quicker), it wouldn't solve the graph load issue whereby So I still wonder whether a parameter to |
Second this! |
I think I will just add a This way I don't have breaking API changes and it also usable in other areas. |
That would be fantastic thanks so much. I will try and contribute back a plugin which strictly does a cyclic check on connection add. Curiously which release is this likely to be shipped under (current, or V2)? |
This is for v1 (which I guess you are using). I will try to port all the features from v1 to v2 though. |
Implemented in v1.10.0 |
Hi!
First off I'd like to give my thanks for creating this library, we're enjoying using it on our project.
I would like to discuss some performance issues we're having, potential fixes, and whether these are something you may consider being part of the core library offering.
Initially, I'd like to share a screenshot of our graph, so you can get an idea of what we're working with.
Now, we're facing several issues:
I've boiled this down to the fact that
CalculateOrder
function, which runs every time weCheckConnection
, is run:Here's what happens every time a node is connected:
Suggested changes?
Allow the
CalculateOrder
check for each node to be optional when calling load, it doesn't seem like there's always a need to do that when we're already running the checks every connection we add. This change alone make's load run in <1s for FF/ChromeDecouple the generation of baklava node execution order, from the cycle checking.
Myself (and perhaps others) are actually just using Baklava as a graph rendering Vue library (then using the save/load feature when done, and running the graph on the server using our own execution logic).
If we were to remove the BFS check / make it optional via some sort of opt in engine config parameter, it speeds up node connection (worse case) from ~20s to ~2s in chrome. It must be noted I am noticing weird behaviour in the fact Firefox seems to be able to handle the stack generated here of ~5mil items on some connections extremely fast, compared to chrome which completely chokes.
Would appreciate any thoughts you have regarding the above!
Thanks
The text was updated successfully, but these errors were encountered: