This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Jank during scroll #4488
Labels
Android
Mapbox Maps SDK for Android
performance
Speed, stability, CPU usage, memory usage, or power usage
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 usesTextureView
).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:
SCROLL
button to programmatically scroll the map horizontally back and forth 3 times to ensure the map tiles have loaded.adb shell dumpsys gfxinfo com.mapbox.mapboxsdk.testapp reset
.SCROLL
button to programmatically scroll the map horizontally back and forth until a sufficient number of frames have been captured.adb shell dumpsys gfxinfo com.mapbox.mapboxsdk.testapp framestats
.Results / observations:
The text was updated successfully, but these errors were encountered: