You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "miserman (via GitHub)" <gi...@apache.org> on 2024/01/14 19:22:39 UTC
[I] [Bug] Graph force layout runs after dispose [echarts]
miserman opened a new issue, #19507:
URL: https://github.com/apache/echarts/issues/19507
### Version
5.4.3
### Link to Minimal Reproduction
https://jsfiddle.net/6rx1hmou/43/
### Steps to Reproduce
In the example, the text shows whether the graph is laying out. Uncomment `chart.dispose()` to see that it continues to layout with no chart.
To reproduce from scratch:
1. Make a chart with graph type series and force layout, with enough data to take a little while to layout.
2. Dispose chart.
3. Look at CPU usage or log processes.
### Current Behavior
[Force layout steps](https://github.com/apache/echarts/blob/58b94179c6199eb374dc29eb846602c02df50b51/src/chart/graph/GraphView.ts#L221C50-L228) continue to fire after chart has been disposed.
### Expected Behavior
It would be nice if steps were stopped if the chart no longer exists, and maybe if there was a function to force steps to stop.
For now, before disposing, I'm manually clearing the timeout and setting `_layouting` to `false`.
### Environment
```markdown
- OS: Window 11
- Browser: Chrome 122.0.6238.2
- Framework: React@18.2.0
```
### Any additional comments?
This came up in the context of a graph made dynamically from user input that could get quite large. After making a large graph, everything would slow down even after switching to a smaller one, because the first one was still being processed in the background.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Bug] Graph force layout runs after dispose [echarts]
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia closed issue #19507: [Bug] Graph force layout runs after dispose
URL: https://github.com/apache/echarts/issues/19507
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org