Reputation: 11
Cytoscape.js and cytoscape-cose-bilkent layout gives me some amazing results.
However once the graph gets bigger (~2k node+3k edges) my CPU usage jumps to 100% for a long time and the user experience suffers.
Do you think would be a good ideea to move the layout processing server side and then use the Preset layout for placing the nodes in the right place?
It s also not clear to me if any advantage of using node.js and 'cytoscape-cose-bilkent' will be offset by the fact Node.js is a single thread environment and in the browser the 'cytoscape-cose-bilkent' library could be using web worker threads?
Upvotes: 1
Views: 439
Reputation: 12250
It depends on what machine is faster and how much latency you'll add by passing the data over the network.
You'd probably be better off looking at your stylesheet and improving your general performance: http://js.cytoscape.org/#performance
Edit : It also depends on graph size. Layout can become disproportionately more expensive as graph size grows. If you have graphs stored on the server, running layouts in the background and caching the result is worthwhile. This is the most compelling usecase I can think of right now for server side layout.
Upvotes: 1