leaflet-ant-path
leaflet-ant-path copied to clipboard
High CPU usage of chrome GPU
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?
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.