You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
There is noticeable jank / stuttering when scrolling the map on Android, both when triggered by gesture and programmatically.
This can be observed with both debug and release builds of the test app as well as with the Mapbox Dev Preview app published on the Play Store.
Tested on Nexus 5, Samsung Galaxy S3 and Nexus 5X.
Note that this seems to be an issue specifically with the Android SDK. There is minimal to no observed jank during scrolling with the iOS test app on an iPhone 5.
It may be of interest that the issue is greatly reduced when using a MapView backed by SurfaceView (as opposed to the current implementation which uses TextureView).
A minimal sample that allows to quickly toggle between the two implementations and makes the jank during scrolling apparent can be found at justasm/mapbox-gl-native@19c528b
Some stats were calculated using the sample, a Nexus 5 running Android 6.0.1 Marshmallow and adb shell dumpsys gfxinfo.
Methodology:
Load up respective version of the MapView using the linked sample.
Tap the SCROLL button to programmatically scroll the map horizontally back and forth 3 times to ensure the map tiles have loaded.
Reset the frame stats data using adb shell dumpsys gfxinfo com.mapbox.mapboxsdk.testapp reset.
Tap the SCROLL button to programmatically scroll the map horizontally back and forth until a sufficient number of frames have been captured.
Retrieve the frame stats using adb shell dumpsys gfxinfo com.mapbox.mapboxsdk.testapp framestats.
@justasm This is great information. Thank you for putting the time and energy into researching this and documenting it. I'm CCing the team so that we can join your efforts to resolve this. Thanks again!
@justasm Thank you so much again for this great report. We should extract the methodology that you describe here into a wiki page so that we can give it continuity and expand it over time.
Regarding the original point in OP, we're now shipping a SurfaceView implementation since v4.2.0-beta.2 (see #5000) that's bringing increased performance to the map. The longer term plan is to continue this optimization path using a GlSurfaceView#5766. Let's continue the conversation there.
Next steps
Extract performance measurement methodology into a wiki page @cammace
Activity
bleege commentedon Mar 31, 2016
@justasm This is great information. Thank you for putting the time and energy into researching this and documenting it. I'm CCing the team so that we can join your efforts to resolve this. Thanks again!
/cc @zugaldia @tobrun @jfirebaugh @tmpsantos @brunoabinader
bleege commentedon Mar 31, 2016
Here's some context on why we switched to using TextureView last Fall.
zugaldia commentedon Sep 22, 2016
@justasm Thank you so much again for this great report. We should extract the methodology that you describe here into a wiki page so that we can give it continuity and expand it over time.
Regarding the original point in OP, we're now shipping a
SurfaceViewimplementation sincev4.2.0-beta.2(see #5000) that's bringing increased performance to the map. The longer term plan is to continue this optimization path using aGlSurfaceView#5766. Let's continue the conversation there.Next steps
cammace commentedon Sep 22, 2016
I've created a new wiki entry on how to test performance. Thanks @justasm.
https://github.com/mapbox/mapbox-gl-native/wiki/Testing-Android-map-performance