CPU usage seems higher on v2.4.1 than v1.13.1 across all major browsers on Mac and Windows
mapbox-gl-js version: 1.13.1 and 2.4.1
browser: Firefox 91, Chrome 92, Edge 93, and Safari 14.1.1 on Mac OS 11.4 and Windows 10
Steps to Trigger Behavior
- Visit the demonstration links
- Use browser tools to view tab-specific CPU usage
- Note that the CPU usage on the v2 example is generally higher (with the specific amount varying somewhat by browser)
Link to Demonstration
I made a demo where I'm calling setData on a source every 100ms to update the information for about 700 features. This is more frequently than we actually update data in our app that focuses on realtime location information about vehicle fleets, but I wanted to make the difference in CPU usage easy to notice.
v1: https://codesandbox.io/s/mapbox-gl-js-v1-performance-tkp6d v2: https://codesandbox.io/s/mapbox-gl-js-v2-performance-t02u5
Expected Behavior
Given the release notes for the v2.x releases, I expected v2 to be less CPU intensive than v1 or remain steady
Actual Behavior
Here're reasonably representative samples of what I'm seeing on my Macbook Pro 16:
| Browser | v1 | v2 | Increase |
| Safari | 80% | 130% | 50% |
| Edge | 43% | 62% | 19% |
| Firefox | 36% | 47% | 11% |
| Chrome | 15% | 18% | 3% |
is this still relevant?
is this still relevant?
Is that a question for me? I'm not sure how to answer it. I haven't attempted to use v2 since I reported this issue 3 years ago