dagrejs/dagre

Performance issue with dagre layout

aradys opened this issue · 0 comments

Hello,
I'm trying to visualize big graphs with thousands of nodes.

I noticed that when using breadthfirst layout the graph is generated about 40x faster than with dagre layout. I was testing on graph with 1k nodes and 2k edges (5 sec vs. 3 min depending on the layout). Is that expected performance?

I am using Angular 11 and I test the simplest graph with no styling etc. like in the code snippet below.

    let cy = cytoscape({
      container: document.getElementById('cy'),
      elements: {
        nodes: this.nodes,
        edges: this.edges
      },
      layout: {
        name: 'breadthfirst',
        // name: 'dagre',
      }
    });