ecomfe / echarts-liquidfill

Liquid Fill Chart for Apache ECharts
https://ecomfe.github.io/echarts-liquidfill/example/
BSD 3-Clause "New" or "Revised" License
1.44k stars 621 forks source link

水球图导致的内存泄漏问题 #28

Open hqzxjczx opened 6 years ago

hqzxjczx commented 6 years ago

One-line summary [问题简述] 水球图放置24小时的时间后, 会导致页面崩溃的等问题, 进一步观测, 其内存增长飞快, 怀疑是内存泄漏问题.

Version & Environment [版本及环境] 测试环境: win7. chrome 浏览器: image 开始记录时间: 20170921 11:17 开始时的内存: 78316k 如图所示: image 结束时间: 20170921 13:30 结束时的内存: 792,328k 如图所示: image

总结: 2个多小时, 内存增长了700多兆. 如果放置一个晚上, 会导致页面崩溃等问题. Expected behaviour [期望结果] 内存不泄露, 水球图放置24小时不会导致页面崩溃. ECharts option [ECharts配置项]

var  options = [
            {
                series: [{
                    type: 'liquidFill',
                    data: [0.6, 0.5, 0.4, 0.3],
                    outline: {
                        show: false
                    },
                    shape: 'container'
                }]
            }
            ];
Ovilia commented 6 years ago

谢谢反馈,我会跟进一下

rachihoaoi commented 6 years ago

禁用动画效果的话不会出现内存泄漏的情况,可以先凑合着用下

hqzxjczx commented 6 years ago

@rachihoaoi 禁用动画也会出现啊。

youkaisteve commented 6 years ago

@hqzxjczx 吾有一法,可解一时之忧:定时dispose,再重新init

759325100 commented 6 years ago

请问这个问题有修复吗

Ovilia commented 6 years ago

@759325100 目前还没有,有点不知道怎么修……

759325100 commented 6 years ago

@Ovilia 请问有临时解决方案吗?优雅一点的就好。现在基本上一晚上chrome就显示内存不足

wyqnumber commented 6 years ago

+1

pissang commented 6 years ago

试试用 svg renderer 是不是还有内存泄漏问题?

Ovilia commented 6 years ago

目前试下来 SVG 并没有内存泄漏的问题,急用的可以先切换到 SVG。还在进一步调试中。

wyqnumber commented 6 years ago

var echart = echarts.init(chart, null, {renderer: 'svg'}); SVG 还是有内存泄漏的问题啊

Ovilia commented 6 years ago

@wyqnumber 判断的依据是什么?我这边放了几分钟稳定以后就不再涨了,测了一个小时没有涨。 ECharts 版本 4.0.2。

wyqnumber commented 6 years ago

嗯,不好意思,我用的是3.6.2的版本,4.0.2版本确实稳定不涨了,谢谢

Ovilia commented 6 years ago

@wyqnumber 水球图发布了 2.0.0 版本,SVG 应该没有内存泄漏的问题了

wyqnumber commented 6 years ago

谢谢

neewbee commented 6 years ago

请问下这个原因可以分享下吗? 我们项目在使用 scatterGL 也会出现这种问题。我想排查一下

AnnieLeo commented 4 years ago

vue.esm.js?efeb:571 [Vue warn]: Error in mounted hook: "Error: Component series.liquidFill not exists. Load it first."为什么一直报这个错?

rachihoaoi commented 4 years ago

@AnnieLeo 这个包是要单独引入的,看你这个报错像是没有引入(卧槽这个issue还没关吗

AnnieLeo commented 4 years ago

引入了,明天我把具体的报错情况发给您,您再看看,我下载的echarts4.1.0,echarts-liquidfill2.0.2包括2.0.3依然报错,在main.js中引入的echarts,然后把它绑定到原型上,再在当前页面import水球图组件,怎么引入她都报这个错,网上看了很多也没解决。发自我的iPhone------------------ 原始邮件 ------------------发件人: rachihoaoi notifications@github.com发送时间: 2019年11月12日 10:37收件人: ecomfe/echarts-liquidfill echarts-liquidfill@noreply.github.com抄送: AnnieLeo 13221006020@163.com, Mention mention@noreply.github.com主题: 回复:[ecomfe/echarts-liquidfill] 水球图导致的内存泄漏问题 (#28)@AnnieLeo 这个包是要单独引入的,看你这个报错像是没有引入(卧槽这个issue还没关吗

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/ecomfe/echarts-liquidfill/issues/28?email_source=notifications\u0026email_token=AJXP7BOADOOXCZ23LWZ55MTQTIJIHA5CNFSM4D4VGLW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDY2NHQ#issuecomment-552707742", "url": "https://github.com/ecomfe/echarts-liquidfill/issues/28?email_source=notifications\u0026email_token=AJXP7BOADOOXCZ23LWZ55MTQTIJIHA5CNFSM4D4VGLW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDY2NHQ#issuecomment-552707742", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

FreadChen commented 3 years ago

经过验证,在echarts 5.1.0版本 搭配 liquidfill 3.0.0,不论SVG还是canvas都出现了内存泄漏。 且触发finished 事件。

sunliker999 commented 3 years ago

請問想在水球下加註文字有什麼辦法?