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

自定义vue节点 节点太多 渲染卡顿 怎么办 #3494

Closed
xufenghu opened this issue Apr 12, 2023 · 13 comments
Closed

自定义vue节点 节点太多 渲染卡顿 怎么办 #3494

xufenghu opened this issue Apr 12, 2023 · 13 comments
Labels
resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems

Comments

@xufenghu
Copy link

问题描述

自定义vue节点 节点太多 渲染卡顿 怎么办

重现链接

暂无

重现步骤

  1. 自定义的vue组件节点 节点上 有很多扩展功能
  2. 新增节点 超过50个的时候 任何节点操作都会使页面渲染卡顿
  3. 节点很多的时候 拖拽中心节点 让所有节点跟着一起拖拽 会有残影出现

预期行为

我期望 自定义节点 不管数量有多少 渲染都不会卡顿 拖拽也不会有残影

平台

操作系统: [Windows]
网页浏览器: [Google Chrome]
X6 版本: [1.32.3]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Apr 12, 2023

👋 @xufenghu

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.

@NewByVector
Copy link
Contributor

建议升级到 2.x 版本,性能会有比较大的提升,不过看你的描述,现在只有50 节点,理论上不应该出现上述情况,能否提供一个可以复现的 demo,我们排查一下。

@NewByVector NewByVector added the resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems label Apr 12, 2023
@xufenghu
Copy link
Author

2.x版本 我之前试过 老是有bug 跟我的项目 不兼容 数据越多的时候 渲染就是会很卡

@NewByVector
Copy link
Contributor

50 个不应该很卡的,能否提供一个 demo 看下呢?你也可以试试 async 模块,看下是否有性能提升。

@xufenghu
Copy link
Author

async 模块 我试过了 差不多的感觉 因为我的vue组件里 定制了很多功能 每次渲染都是 把所有数据全都重新渲染 所有很卡 我不知道有没有方法可以 进行局部渲染 没改过的节点 不渲染

@NewByVector
Copy link
Contributor

最好做局部渲染的,每次都重新渲染肯定有性能问题的。这个需要你们自己来实现。

@565823371556Zsl
Copy link

50 个不应该很卡的,能否提供一个 demo 看下呢?你也可以试试 async 模块,看下是否有性能提升。

我在graph中的渲染的节点是vue节点,我使用的 多选框插件,多选节点,并进行拖拽时,节点数如果有50个就会非常卡顿

@565823371556Zsl
Copy link

50 个不应该很卡的,能否提供一个 demo 看下呢?你也可以试试 async 模块,看下是否有性能提升。

有没有办法,框选移动节点的时候,不移动节点,只移动那个框,等松开鼠标的时候再把节点移动过去

@damnright
Copy link
Contributor

50 个不应该很卡的,能否提供一个 demo 看下呢?你也可以试试 async 模块,看下是否有性能提升。

有没有办法,框选移动节点的时候,不移动节点,只移动那个框,等松开鼠标的时候再把节点移动过去

可以自己实现,先获取节点包围框,松开鼠标了移动过去即可

@qiufeihong2018
Copy link
Contributor

最好做局部渲染的,每次都重新渲染肯定有性能问题的。这个需要你们自己来实现。

怎么做局部渲染?

@NewByVector
Copy link
Contributor

@qiufeihong2018 如果是 2.x 版本,开启 virtual 就具备可视区域渲染能力。

@Mephistol
Copy link

最好做局部渲染的,每次都重新渲染肯定有性能问题的。这个需要你们自己来实现。

请教一下,我的1.34.13版本,通过创建节点时候visible和拖拽画布时候setVisible模拟了virtual功能,不过minimap功能就废了,minimap没办法展示初次可视区域以外的节点,有啥好办法吗?🥺

@x6-bot
Copy link
Contributor

x6-bot bot commented Jul 6, 2024

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Jul 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems
Projects
None yet
Development

No branches or pull requests

6 participants