mapbox / mapbox/mapbox-maps-android
OfflineRegionManager (legacy) createOfflineRegion: download speed drop
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 578
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Android OS version: 11
- Devices affected: Samsung Tab Active Pro
- Maps SDK Version: 9.1.0, 10.16.0, v11.0.0-beta.4
## Observed behavior and steps to reproduce
I noticed a significant speed drop in v10(v11) compared to v9. Here are several benchmarks for the same region
```
bounds: [
[10.60776473348605, 59.874330907868426],
[10.712617871809584, 59.92020667067757],
],
minZoom: 4,
maxZoom: 16,
styleURL: 'mapbox://styles/mapbox/light-v10'
```
v9: **6s** 1039/1039 resources; 11759854 bytes downloaded
v10 legacy manager: **16s** 1035/1035 resources; 11358923 bytes downloaded
v10 new tile manager: **20s** 16/16 resources; 68958332 bytes downloaded
Note: The iOS legacy manager v10 has the same speed performance as v9 (iOS simulator), so the problem is only relative to Android. I tested with different tile servers (self-hosted and Mapbox) in different regions by using RN bridge and the latest [Test Android app](https://github.com/mapbox/mapbox-maps-android/blob/main/app/src/main/java/com/mapbox/maps/testapp/examples/LegacyOfflineActivity.kt). The behavior is the same, region creation is slower almost 3 times for v10. Is it expected?
## Expected behavior
Expected to have at least the same performance as in older versions.
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
Start with app/src/main/java/com/mapbox/maps/testapp/examples/LegacyOfflineActivity.kt and reproduce createOfflineRegion using the issue's bounds, zooms, and style URL on Android. Compare resource counts, bytes, and elapsed time with the reported v9 and v10 results; done means the Android regression is explained and region creation no longer shows the reported slowdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100