dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.84k stars 587 forks source link

DagreD3 Speedup #249

Closed shoinkis closed 8 years ago

shoinkis commented 8 years ago

@cpettitt

Hello I know that this Project is not actively developed or maintained in the current state, so excuse me if I still do a ticket for this.

My question is, if there is an obvious way or a direction in which dagre d3 could be speeded up significantly. Right now I'm using DagreD3 as a graph library for my internship. And I use like ~200 Nodes and ~250 Connectors. With that amount it already needs a significant amount of time to render the graph. Not Rendering Nodes is already implemented in my code.

Are the algorithms used (I ask because I got no expertise in this) already "good" ones, or is it the web technology itself that makes it scale badly?

I'm very satisfied using this tool and want to thank all contributors for it :+1:

cpettitt commented 8 years ago

Dagre is heavily inspired by papers on graphviz, which is very fast, but uses some more modern algorithms where there is a clear benefit. I suspect most of the cost is due to the language and the lack of fine grained control for how data structures are laid out. You may be able to get some modest wins (e.g. by optimizing for a particular VM), but I don't think there are obvious massive speedups to be had.