mapbox-maps-android
mapbox-maps-android copied to clipboard
[Performance] dispatchTelemetryTurnstileEvent on main thread
Environment
- Android OS version: any
- Devices affected: any
- Maps SDK Version: 10.7.x - 10.8.x (but probably more)
Observed behavior and steps to reproduce
I have been doing some benchmarking of startup times for my screens that contain mapbox maps, and found that a significant portion of startup time comes from firing Turnstile events during mapcontroller startup.
I guess it's necessary to do those things, but do they really have to run on the main thread?

Expected behavior
Better startup performance of the map.
Notes / preliminary analysis
If you look at the screenshot of the CPU trace from Android studio, a lot of it comes from just reading the phone state (network info) from the system. I do not believe any of those system calls need to happen on the UI thread.