Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x6 在绘制边的时候,边的数量越多,每条边耗时越久,导致100条边的时候,页面需要加载3.4秒,是否可以优化 #3960

Open
wk416689863 opened this issue Oct 9, 2023 · 3 comments
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions

Comments

@wk416689863
Copy link

问题描述

1.xx 版本 在绘制边的时候,边的数量越多,每条边耗时越久,导致100条边的时候,页面需要加载3到4秒,如果是定制化的边,页面加载更慢,是否可以优化

重现链接

https://antv-x6.gitee.io/zh/examples/edge/connector#jumpover

重现步骤

官网示例 ;连线-跳线,当修改 graph.addNode()方法的个数时发现每条边耗时超过30ms,而且边越多,每条边耗时是增量

1,1条边,每条边耗时4ms
1条边耗时
2,100条边,每条边耗时37ms
100条边,每条边耗时

预期行为

是否能优化,减少每条边的时间

平台

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

屏幕截图或视频(可选)

No response

补充说明(可选)

页面数据过多时,加载很慢。

@x6-bot
Copy link
Contributor

x6-bot bot commented Oct 9, 2023

👋 @wk416689863

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@cyrilluce
Copy link
Contributor

本质上应该是 jumpover connector 的性能问题吧,计算交叉点的时间复杂度是O(n!)

@NewByVector
Copy link
Contributor

直接升级到 2.x 吧,性能有较大的提升。

@NewByVector NewByVector added the type: discussion 讨论 Usage questions, guidance, and other discussions label Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions
Projects
None yet
Development

No branches or pull requests

3 participants