cytoscape / cytoscape.js-dagre

The Dagre layout for DAGs and trees for Cytoscape.js
MIT License
250 stars 83 forks source link

Performance issue #71

Closed aradys closed 3 years ago

aradys commented 3 years ago

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',
      }
    });
maxkfranz commented 3 years ago

If you have questions about the algorithm, you should forward those along to the algorithm's repo: https://github.com/dagrejs/dagre

This repo is a wrapper

aradys commented 3 years ago

Ok, I added issue to algorithm's repo: https://github.com/dagrejs/dagre/issues/315

stale[bot] commented 3 years ago

This issue has been automatically marked as stale, because it has not had activity within the past 30 days. It will be closed if no further activity occurs within the next 30 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.