[Bug] deck.gl very power hungry when idle
Description
Power draw when idle (currently 50% CPU on a MacBook Pro / Safari for simple examples like https://deck.gl/examples/icon-layer) is very high.
Attached a screenshot of the Safari Timeline Power Usage for completely idle state on the Icon Layer Example page https://deck.gl/examples/icon-layer.
Originally posted by @MrMorice in https://github.com/visgl/deck.gl/discussions/9041
Flavors
- [ ] Script tag
- [ ] React
- [ ] Python/Jupyter notebook
- [X] MapboxOverlay
- [ ] GoogleMapsOverlay
- [ ] CartoLayer
- [ ] ArcGIS
Expected Behavior
Power draw when map is idle should be around 2%.
Steps to Reproduce
Open https://deck.gl/examples/icon-layer in Safari on MacOS or iOS, then use timeline view to profile power usage.
Environment
- Framework version: [email protected]
- Browser: Safari, potentially others
- OS: MacOS, iOS
Logs
No response
Are you able to hover on the flamegraph and see what functions are being called?
I ran the standalone icon-layer example on master and got this flamegraph:
Hi @ibgreen, thanks for taking a look! Did not find something like the Chrome flame graph in Safari but here are two screenshots from the timeline graph. Maybe this helps?
Hello, I noticed the same thing in our app that contains a deck gl map, when the website was just open and idling I saw a cpu load of around 10%. I investigated our code for issues but could not find one, I eventually found that it was the map doing the load. You can also observe the same behaviour in the example's of deck.gl.
On this page: https://deck.gl/examples/multi-view checking the cpu load I see a constant load of around 5% while that map is not doing anything.
@ibgreen Do you think there is any chance for a fix on this? This issue is affecting most iOS users and very quickly drains battery while using deck.gl apps. Thank you!