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
Polyline decoding is expensive especially on long route steps and if GPS updates are frequent, so decoding the polylines a single time when you parse the route json and storing the resulting List<Position> coordinates as part of each LegStep will help significantly with memory usage and general performance.
Polylines are decoded 6 times on every new location update (9 times if a new step!) in
NavigationEngine.handleRequest
:mapbox-navigation-android/navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/NavigationEngine.java
Lines 63 to 72 in 05a2f56
generateNewRouteProgress()
:userSnappedToRoutePosition()
stepDistanceRemaining()
first here and also here vianextManeuverPosition()
isUserOffRoute()
viauserTrueDistanceFromRoute()
SnapToRoute.getSnappedLocation()
viasnapLocationLatLng()
andsnapLocationBearing()
Polyline decoding is expensive especially on long route steps and if GPS updates are frequent, so decoding the polylines a single time when you parse the route json and storing the resulting
List<Position> coordinates
as part of eachLegStep
will help significantly with memory usage and general performance.cc @cammace @danesfeder
The text was updated successfully, but these errors were encountered: