-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Downloading an offline region on Android takes ~3x as long as iOS #10252
Comments
I’d speculate that this has to do with:
|
In my experience, offline downloads are usually bottlenecked on gzip content decoding/re-encoding (#3886). |
Could it be possible that we're creating multiple From the docs:
cc: @tobrun |
The current |
@danswick I assume you ran your tests on a physical device. Could you compare your times by running the same download on an emulator? I just did it on my end (same region, on wi-fi) and I got times closer to iOS on an Android emulator (45 sec) while slightly longer (71 sec) on a device (Pixel XL). @tobrun Still wondering about OkHttp pool's size. By default, OkHttp has a max of 5 connections per host, while core is setting 20. How're we exposing that limit to OkHttp, shouldn't we be setting |
@zugaldia ah, sorry for the omission. Yes, I was originally testing on a physical Google Pixel phone. I just tested several times using the emulator (emulated Google Pixel running Android O) and consistently got times around 35 seconds for the same region and over the same wireless network with similar speeds as in the OP. |
@zugaldia great catch on the |
@danswick thanks for the quick test. The fact that emulator's download times are consistently faster seems to support the idea that we're hitting hardware (CPU, I/O) limitations as indicated by @jfirebaugh and @friedbunny above. |
Platform: iOS and Android
Mapbox SDK version: Android 5.2.0-beta.2, iOS 3.6
Description of benchmark test
@boundsj and I attempted to download the same offline region using the Android and iOS versions of the SDK. We tested on both wifi (in the Mapbox SF office) and LTE, noting network speeds, download times, and final download sizes along the way.
iOS offline region
Android offline region
We both tested using the latest Mapbox Streets style (
mapbox://styles/mapbox/streets-v10
).Test results
Mapbox WiFi
Stats
🍏 iOS: 51 seconds for 78.9 MB
🤖 Android: 3 minutes, 57 seconds for 76.06 MB
LTE
Stats (iOS)
Stats (Android)
🍏 iOS: 53 seconds for 78.9 MB
🤖 Android: ~3 minutes, 20 seconds for 76.06 MB
Expected behavior
Download speeds are similar between platforms.
Actual behavior
Download speeds are around 3 times longer on Android when compared to iOS.
Note: while the network speeds were significantly slower on our Android test device, the discrepancy in download times is consistent with those found while testing on the same WiFi network, suggesting that network speed is not the bottleneck.
The text was updated successfully, but these errors were encountered: