G6 icon indicating copy to clipboard operation
G6 copied to clipboard

force2布局1000个节点2000个关系首次加载时间长

Open kevindurant-source opened this issue 1 year ago • 2 comments

问题描述

那天看了下4333号这篇issue,就是我实际场景有个1000个节点,2000个边,然后使用的是这个布局,结果首次加载很慢,3分钟没结束,版本是最新的4.8.23。高于4.8.8。然后在官网这个例子上面加了下面的布局我看首次加载的时间还是很长。这个能有办法优化吗。https://g6.antv.antgroup.com/examples/performance/perf#netscience layout: { preset: { type: 'fruchterman', gpuEnabled: true, gravity: 1, width: 1000, height: 1000, }, type: 'force2', animate: true, linkDistance: 50, maxSpeed: 2000, damping: 0.3, interval: 0.05, minMovement: 5, },

重现链接

https://g6.antv.antgroup.com/examples/performance/perf#netscience

重现步骤

https://g6.antv.antgroup.com/examples/performance/perf#netscience 这个官网例子加上这个布局 layout: { preset: { type: 'fruchterman', gpuEnabled: true, gravity: 1, width: 1000, height: 1000, }, type: 'force2', animate: true, linkDistance: 50, maxSpeed: 2000, damping: 0.3, interval: 0.05, minMovement: 5, },

预期行为

1000个节点2000个关系布局加载时间快一点且能有力导的效果

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]
  • G6 版本: [4.5.1 ... ]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

kevindurant-source avatar Nov 15 '23 06:11 kevindurant-source

Hi @kevindurant-source, Please star this repo if you find it useful! Thanks :star:! 你好 @kevindurant-source。如果该仓库对你有用,可以 star 一下,感谢你的 :star:!

github-actions[bot] avatar Nov 15 '23 06:11 github-actions[bot]

请问你解决了吗,这个force2布局无论哪个版本都超级慢,2000个节点就几分钟才能渲染出来

HogoZhang avatar Dec 21 '23 02:12 HogoZhang

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

github-actions[bot] avatar Jul 05 '24 05:07 github-actions[bot]