Skip to content
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

Recursive DFS implementations #327

Open
ethan-keller opened this issue May 22, 2022 · 0 comments
Open

Recursive DFS implementations #327

ethan-keller opened this issue May 22, 2022 · 0 comments

Comments

@ethan-keller
Copy link

Hi dagrejs team,

Thank you for the nice graph layout. I know this repository is deprecated, but this issue seemed reasonable to declare since many users might run into this problem.

Many files (e.g., lib\rank\feasible-tree.js, lib\rank\network-simplex.js, lib\rank\util.js) in dagre contain DFS implementations. To the best of my knowledge they are all implemented in recursive fashion.

While recursiveness comes with easier readability and less code, it also comes with limitations. One of them being the limited stack size on a machine.

While using dagre with big graphs (3000+ nodes), I ran into max call stack size errors originating from these recursive DFS functions.

It would be a good idea to rewrite the recursive DFS functions to iterative DFS functions.
This way dagre users can use the dagre layout for their big graphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant