Map freeze on startup on Android Chrome & System WebView
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
### mapbox-gl-js version
v3.21.0
### Browser and version
Android Chrome 146.0.7680.177 - Pixel 7 Pro (Android 16). The map is normally hosted in a Capacitor 8 app and uses Angular/zone.js.
### Expected behavior
Map starts up with the same performance it had on v3.20.0
### Actual behavior
After upgrading to 3.21.0, the map freezes on initial load on mobile. The same page loads in under 2 seconds on 3.20.0. This happens in both the device's Chrome browser and our Capacitor WebView.
I captured a Chrome DevTools performance trace on device. Three massive animation frames (8.5s, 11.8s, 5.1s) during map load. The dominant costs are two runs of these:
setupDepthForOcclusion → setTerrainUniformValues → set: ~16.5s (total)
upload: ~8.6s (total)
### Link to the demonstration
_No response_
### Steps to trigger the unexpected behavior
This seems to happen running a previously stable map component on Android Chrome as well as Android System WebView in a capacitor app.
I can share the specific map style privately to help debug. I've tested with 2 of our styles and had the same result.
### Relevant log output
```shell
Nothing came out in the logs
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the startup freeze on Android Chrome and Android System WebView with mapbox-gl-js v3.21.0, then compare it with v3.20.0. Start with the performance trace around setupDepthForOcclusion, setTerrainUniformValues, and upload; done means the map starts without the reported multi-second animation frames or regression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend, mobile-dev, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100