echarts 涟漪图-effectScatter-加上后cpu占用率从5%跳到38%左右,请问如何解决?

jmo0nnb3  于 2022-11-03  发布在  Echarts
关注(0)|答案(9)|浏览(538)
  • I am using English in this issue. 在这个 Issue 中我使用了英文(强烈建议)。

General Questions

PLEASE MAKE SURE OF ALL THE FOLLOWING OPTIONS IN REQUIRED FIELDS ARE TICKED (with x)!
Otherwise, the issue will not be answered.
And think before you tick. :)
请确保以下每项都打上勾了!并且确保都做了这些事哦~ 这将大量简化我们的工作流程,使你的问题更快速得到解答。

  • Required: I have read the document and examples and tried to solve it by myself. (必填)我读过了文档和教程,并且曾试图自己解决问题。
  • Required: I have searched for similar issues and that didn't help. (必填)我搜索过 issue 但是没有帮助。
  • Required: I have tried with the latest version of ECharts and still have this problem. (必填)我试过最新版本的 ECharts,还是存在这个问题。

In this issue, I have provided information with: 在这个 issue 中我提供了以下信息:

  • Required: issue type;(必填)issue 类型
  • [ x] Required: one sentence description in issue details;(必填)一句话的问题描述
  • [x ] Required: demo;(必填)能反映问题的例子(如果你想提问或报 bug)
  • [ x] Required: ECharts version;ECharts 版本

Issue Type

  • I have a question to ask about how to use ECharts to ...;我想提问如何使用 ECharts 实现某功能
  • [x ] I have a bug to report;我想要报 bug
  • I have a feature to request, e.g.: I'd like a new feature that ...;我需要一个新功能
  • I have a feature to enhance, e.g.: The current feature should be improved in the way that ...;我希望改进某个功能
  • There's something wrong with the documents;文档有些问题
  • Others, or I'm not sure which issue types to choose here;其他,或我不知道应该选什么类型

Issue Details

我在geoMap中使用了effectScatter后,cpu占用率激增

Expected Behavior

能够降低cpu占用

Current Behavior

cpu占用30%以上

Online Example

Map渲染后如下:

占用率如下(火狐浏览器):

{
name: '涟漪图',
type: 'effectScatter',
showEffectOn: 'render',
coordinateSystem: 'geo',
rippleEffect: {
period: 6,
scale: 6,
brushType: 'fill' // 动画中波纹的最大缩放比例。stroke fill
},
animation: false,
// data: seriesData.fluxSeriesData,
data: [
{
"symbolSize": 12,
"itemStyle": {
"color": "rgba(250,58,71,0.6)"
},
"value": [
"116.403039",
"39.914909"
]
}
],
z: 1
}

Topics

  • Legend
  • Tooltip
  • Event
  • Performance
  • SVG
  • Map
  • ECharts GL
  • Third-party libraries, e.g.: Vue.js, React

Anything Else We Need to Know

{DESCRIBE_HERE}

Environment

  • ECharts version;ECharts 版本: 4.0.4
  • It happens only on certain browsers or operating systems. 对于特定浏览器或操作系统才会出现的问题,请提供相应环境信息:{BROWSER_VERSION_OR_OS_INFORMATION_HERE}
p8ekf7hl

p8ekf7hl2#

please tell me how to resolve this problem? Thank you

dgsult0t

dgsult0t3#

跟了一下,看起来是 zrender的锅

ryevplcw

ryevplcw4#

将scatter改为effectScatter后,CPU由40%飙升至100%,请问有什么好的解决方案吗
观察过profile,使用effectScatter,由于需要渲染动画效果Function Call step无限循环,目前只能不用effectScatter。期待有更好的方案

hmae6n7t

hmae6n7t5#

I have the same problem, waiting to be solved!

l7mqbcuq

l7mqbcuq6#

敢问楼主,这个问题解决的怎么样啦?有什么好的解决方案可以请教一下呢。

5kgi1eie

5kgi1eie7#

把 effectScatter 系列设置 zlevel: 1 分层刷新试试

7gs2gvoe

7gs2gvoe8#

把 effectScatter 系列设置 zlevel: 1 分层刷新试试

@pissang 这个方法可以的,感谢感谢。

v440hwme

v440hwme9#

@pissang 解决了,非常感谢!

相关问题