antvis/G2

计时器造成CPU开销耗电 #3579

samuelhsin posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

https://g2.antv.vision/en/examples/case/line#line1

Steps to reproduce

tab停在当页,打开Dev Tools 然后查看CPU使用率,无法降到1%以下

Environment Info
g2 4.1.24
System -
Browser -

应该d3-timer.js的一个timer造成的,可以查看Timeline.js的初始化定时器部份

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


因为开启动画,所以会有一个动画执行的 timer,这个消耗其实是一个空执行逻辑。

posted by hustcc over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests