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

vue3 使用时 切换显示状态 内存一直在增加 没有自动清楚缓存 #1581

Open
shmily-xxx opened this issue Apr 18, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@shmily-xxx
Copy link

What happened?

vue3 使用时 切换显示状态 内存一直在增加 没有自动清楚缓存 这只是例子 实际内容更多 更卡
最开始内存
1713433395983
切换几次后内存
1713433159666
logicflow.zip

Core Version

1.1.23

Extension Version

1.1.23

Engine Version

No response

What browsers are you seeing the problem on?

Chrome

@shmily-xxx shmily-xxx added the bug Something isn't working label Apr 18, 2024
@shmily-xxx
Copy link
Author

1713517432925
发现新增的这个自定义html节点没有删除 多次操作会一直增加 内存也在增加

@DymoneLewis DymoneLewis self-assigned this Apr 22, 2024
@DymoneLewis
Copy link
Collaborator

感谢反馈,确实有这样的问题,目前正在开发destroy方法,短期比较推荐在FlowChart的beforeDestroy里调用一下lf.clearData()方法清空画布或者使用v-show控制组件的显隐

@shmily-xxx
Copy link
Author

我尝试了lf.clearData()方法 节点还在 感觉作用不是太大

@wumail
Copy link
Collaborator

wumail commented Apr 26, 2024

我尝试了lf.clearData()方法 节点还在 感觉作用不是太大

我跑了下你给的示例
1、FlowChart组件销毁但是节点内存不释放的问题确实存在,无论是html节点还是一般的节点
image
image
2、内存的增长情况还好
一开始:
image
GC后:
image
3、尝试做了一些解除引用的动作,有一定作用,但是不影响结论1
image
image
image
image

@shmily-xxx
Copy link
Author

我尝试了你的这种方法 列子里面数据少 我用到项目组作用不大
这是我用例子跑的 先切换显隐看下是100mb 再切换很多次增加到了200mb,而且 componentWillMount() {
this.app.unmount()
}还会有警告
1714114766777

1714115064331
请问下 后期会提供 销毁方法吗?

@wumail
Copy link
Collaborator

wumail commented Apr 26, 2024

我尝试了你的这种方法 列子里面数据少 我用到项目组作用不大 这是我用例子跑的 先切换显隐看下是100mb 再切换很多次增加到了200mb,而且 componentWillMount() { this.app.unmount() }还会有警告 1714114766777

1714115064331 请问下 后期会提供 销毁方法吗?

销毁的方法目前看确实是需要的,内存未释放的问题需要整体看下、排查一下,工作量可能不小

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants