leaflet-ant-path icon indicating copy to clipboard operation
leaflet-ant-path copied to clipboard

High CPU usage of chrome GPU

Open cojalvo opened this issue 4 years ago β€’ 1 comments

Type:

  • [x] bug
  • [ ] feature
  • [ ] enhancement
  • [ ] question

Environment:

  • OS: Mac OS
  • Browser: Chrome
  • Library Version:

I'm going to open a PR:

  • [ ] yes
  • [x] no

Description: Hi, leaflet-ant-path cause a high CPU usage of Chrome any idea why?

cojalvo avatar Apr 11 '20 21:04 cojalvo

I want to bump this issue. This issue is a bit lackluster in details, but I too notice a lot of CPU usage while using this plugin. So much that I'm considering replacing it or getting rid of it entirely.

I'm using the plugin on https://keystone.guru/. Demo -> https://keystone.guru/bbzlbOX. CPU usage is 40 on my machine (according to Chrome Task Manager). I tinkered with it and most CPU usage is caused by the animated lines. If you for example check https://keystone.guru/yry94O3 you can see that without the animated lines it takes up a whole lot less CPU.

I can also notice it from your example site where CPU usage spikes up the moment you unpause the animated line https://rubenspgcavalcante.github.io/leaflet-ant-path/.

If you have any idea on how to further improve performance I'd be very happy to see them implemented! Thank you.

Wotuu avatar Oct 08 '20 15:10 Wotuu