Open ghost opened 10 years ago
Which DFS function? You should be able to safely switch to using a stack anywhere we're doing DFS. If anything, it might perform slightly better depending on how well the optimizer handles that part of the code.
Thanks a lot! Only stack exceed limit error occur for this function dfs(v, component), so I changed it to iterative.
I tried to generate the static picture of the rendered graph with phantom.js, but when node number is huge, it will exceed browser stack limit. I think the the stack size for webkit render engine is 500. So I changed the DFS function inside dagre to itterative instead of recursion. Does that affect any performance?