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

[tree] 数据量大的时候 filter会导致页面卡顿 input输入卡顿 #2510

Open
zhangningself opened this issue Jun 13, 2023 · 3 comments

Comments

@zhangningself
Copy link

tdesign-vue 版本

1.4.0

重现链接

https://codesandbox.io/s/tdesign-vue-demo-forked-gvd8nw?file=/src/demo.vue:1758-1764

重现步骤

QQ.20230613143750.mp4

1686638849868
image
image

期望结果

不要卡

实际结果

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link
Contributor

👋 @zhangningself,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

♥️ 有劳 @TabSpace 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @zhangningself

@TabSpace
Copy link
Collaborator

检查了导致性能问题的原因,目前看来比较难解决。
filter 属性更新的时候,所有节点要做状态更新,以节点数据量 8000 计算,会进行 8000 次 update ,性能较差。
但是不做这个 update, 很难兼顾虚拟滚动下各个节点在不同滚动高度下的状态,除了显示之外,还有层级和锁定状态。
如果要做局部 update,目前没有想到很简单的解决方案。
所以目前只做了小幅度的性能改进,目前来看只能保证 3000 节点左右卡顿不明显,5000节点左右有小幅度卡顿。
此外发现,console.log 日志会严重拖慢性能,去掉这个日志性能会有一定提升。
进一步的性能解决,有可能需要同时对虚拟滚动和列表状态更新进行改动,需要留一个较长的周期来探索解决方案。

pull request:
#2586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants