iVis-at-Bilkent / cytoscape.js-fcose

fCoSE: a fast Compound Spring Embedder
MIT License
145 stars 26 forks source link

When the amount of data exceeds 2000, fcose layout consumes a lot of performance, accounting for 65% of the total rendering time #46

Closed duuliy closed 3 years ago

duuliy commented 3 years ago

My configuration is as follows "cytoscape-fcose": "^1.2.3" ,Is there a better optimization plan

name: 'fcose', fit: true, padding: 30, animate: false, nodeSeparation: 225, piTol: 0.0000001, nodeRepulsion: 18000, idealEdgeLength: 100, edgeElasticity: 0.45, nestingFactor: 0.1, tile: false, tilingPaddingVertical: 30, tilingPaddingHorizontal: 30,

hasanbalci commented 3 years ago

@duuliy Thanks for using fCoSE. fCoSE is designed for small to medium-sized graphs (up to a few thousand of nodes and edges), so depending on the graph topology closing to or exceeding these numbers may cause a decrease in the performance of the algorithm. Here are some ways we can suggest for a better performance:

I also suggest using the latest version of fCoSE, since it includes new features and miscellaneous bug fixes.

duuliy commented 3 years ago

@duuliy感谢您使用 fCoSE。fCoSE 是为中小型图(最多几千个节点和边)设计的,因此根据接近或超过这些数字的图拓扑,可能会导致算法性能下降。我们可以建议以下一些方法以获得更好的性能:

  • 如果您的节点尺寸统一或接近统一,您可以将uniformNodeDimensions选项设置为true。这节省了大量与力相关的计算。
  • 如果您的图形由断开连接的组件组成,那么您可以激活packComponents选项。此选项使 fCoSE 能够单独布置每个组件,然后以令人满意的方式将它们打包。布置较小的部分而不是整个图形也可以提高性能。请注意,此选项需要在您的应用程序中注册cytoscape-layout-utilities扩展。
  • 如果图很大,我们建议使用复杂性管理技术。这些技术包括:

我还建议使用最新版本的 fCoSE,因为它包含新功能和各种错误修复。

OK, thank you for your reply