echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] setOption会导致页面js events listeners不断累加

Open qinxiangling opened this issue 3 years ago • 3 comments

Version

5.1.1

Link to Minimal Reproduction

No response

Steps to Reproduce

根据官网说明,使用setOption(option, {notMerge: true, lazyUpdate: false, silent:false})动态更新图表,会导致JS event listeners不断累加导致页面卡顿,最后内存溢出。 即使在更新的option中设置所有为空也仍然不断增加(data:[]) 数据构建好,仅不进行渲染也不会增加listeners,只要渲染,无论是否为空都会一直累加

Current Behavior

Uploading 393bc6961337930fab0e1e604e96ad7.jpg… Uploading 727707795ce109b603e9d707497fc35.jpg…

Expected Behavior

应该如何渲染解决内存溢出问题

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

qinxiangling avatar Aug 22 '22 10:08 qinxiangling

@qinxiangling It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Bug] setOption causes the pages to accumulate episode listeners

BODY

Version

5.1.1

Link to Minimal Reproduction

No response

Steps to Reproduce

According to the instructions on the official website, using setOption(option, {notMerge: true, lazyUpdate: false, silent:false}) to dynamically update the chart will cause the JS event listeners to continue to accumulate, causing the page to freeze and eventually memory overflow. Even if you set all to be empty in the updated option, it still keeps increasing (data:[]) The data is well constructed, and the listeners will not be added only if the rendering is not performed. As long as the rendering is performed, it will continue to accumulate regardless of whether it is empty or not.

Current Behavior

Uploading 393bc6961337930fab0e1e604e96ad7.jpg… Uploading 727707795ce109b603e9d707497fc35.jpg…

Expected Behavior

How to render to solve the memory overflow problem

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

echarts-bot[bot] avatar Aug 22 '22 10:08 echarts-bot[bot]

@qinxiangling Please provide a demo for the issue either with Official Editor, CodePen, CodeSandbox or JSFiddle.

echarts-bot[bot] avatar Aug 22 '22 10:08 echarts-bot[bot]

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Aug 21 '24 21:08 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar Aug 28 '24 21:08 github-actions[bot]