OfflineRegionManager (legacy) createOfflineRegion: download speed drop
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. 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.
@orca-nazar hey! Thanks for detailed report. It is pretty awkward you're seeing such numbers, can you please share the whole benchmark you're running (with Mapbox hosted tiles to make it easier to run)? The new offline should not be slower.
I used rnmapbox lib to switch between v9 and v10 to compare performance. If this is acceptable to you, I can tune a fork and share it?
@orca-nazar That would be helpful, although it's good for us to understand your whole process/methodology as well.
This is testing multiple parts of our stack E2E, there's a good chance you might have prewarmed a cache or something.
Hey, just updated my fork with the example test app inside. Here is a guide how to setup everything. Hope it will be helpful