3

I'm using Dagre to generate graph coordinates on the frontend for a graph of around 700 nodes & 700 edges and it is currently taking around 1.5 to 2 seconds to generate (this is before rendering). How should I go about optimising this, are there any known ways to speed it up?

For example, I already know the graph is directed, acyclic & topo-sorted (validated in API), so could somehow skip this part of the algorithm?

Another approach could be to try and reduce the size of the graph in the first place, by 'clustering' closed groups as per the diagram below (which could then be expanded on click in the ui). Any known algorithms to achieve this?

enter image description here

Dave
  • 1,051
  • 1
  • 10
  • 20

0 Answers0