Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cytoscape.js large data performance vs sigma.js

I'm having a lot of trouble rendering a graph in cytoscape.js with ~1,000 nodes and ~5,000 edges (takes a very long time to render, once rendered impossible to interact with since browser is overloaded), however the same size graph appears to render fine and works well with sigma.js (http://sigmajs.org/).

I'm wondering why there is such a vast performance difference in the two libraries. I'd like to use cytoscape.js if possible since it seems much better documented and easier to work with, but I can only do so if it is able to work with sizable graphs in the browser.

Any ideas?

like image 991
Patrick DeVivo Avatar asked Nov 03 '22 19:11

Patrick DeVivo


1 Answers

Sigma has hacks that allow it to render faster, such as disabling edge rendering on viewport events. If you make all from the trunk, the hideEdgesOnViewport init option should do what you're looking for -- giving you more or less the same level of performance as sigma.

like image 118
maxkfranz Avatar answered Nov 15 '22 06:11

maxkfranz