Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[Android] Update marker icon problem #4534

Closed
mpuchala opened this issue Mar 30, 2016 · 6 comments
Closed

[Android] Update marker icon problem #4534

mpuchala opened this issue Mar 30, 2016 · 6 comments
Labels
Android Mapbox Maps SDK for Android

Comments

@mpuchala
Copy link

Guys,

I'm updating about 150 marker icons at a time in a loop. Code is extremely simple like

if (mMarker != null &&) {
 mMarker.setIcon(MapIcons.get(mZoomType, mIsMarkerSelected));
}

When I use 4.0.0-rc.1 it's more or less ok (about 1000ms). Problem is with current snapshot because exactly same code can take up to 25 seconds.

Example of log:

03-30 17:14:41.043 21972-21972/.../MapItem: ⇠ updateMarker [291ms]
03-30 17:14:41.044 21972-21972/.../MapItem: ⇢ updateMarker()
03-30 17:14:41.315 21972-21972/.../MapItem: ⇠ updateMarker [271ms]
03-30 17:14:41.315 21972-21972/.../MapItem: ⇢ updateMarker()
03-30 17:14:41.562 21972-21972/.../MapItem: ⇠ updateMarker [246ms]
03-30 17:14:41.562 21972-21972/.../MapItem: ⇢ updateMarker()
03-30 17:14:41.809 21972-21972/.../MapItem: ⇠ updateMarker [243ms]
03-30 17:14:41.812 21972-21972/.../MapItem: ⇢ updateMarker()
03-30 17:14:42.020 21972-21972/.../MapItem: ⇠ updateMarker [207ms]
03-30 17:14:42.023 21972-21972/.../MapItem: ⇢ updateMarker()
03-30 17:14:42.253 21972-21972/.../MapItem: ⇠ updateMarker [229ms]
03-30 17:14:42.253 21972-21972/.../MapItem: ⇢ updateMarker()
03-30 17:14:42.483 21972-21972/.../MapItem: ⇠ updateMarker [229ms]
03-30 17:14:42.486 21972-21972/.../MapItem: ⇢ updateMarker()
03-30 17:14:42.714 21972-21972/.../MapItem: ⇠ updateMarker [227ms]
03-30 17:14:42.714 21972-21972/.../MapItem: ⇢ updateMarker()
03-30 17:14:42.937 21972-21972/.../MapItem: ⇠ updateMarker [222ms]

Is it known issue? Or maybe you would change something and there will be possibility to update all of them at the same time? If not, current solution seems to be useless with more than few icons...

@tobrun I would be grateful for any clarification

EDIT:
Interested thing - it looks like on rc.1 it worked probably in other way - most of markers is being updated in almost no time (core changes?). Below is my log (in contrast to previous one) where you can find only one marker which took time.

03-30 18:15:51.392 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.395 6399-6399/.../MapItem: ⇠ updateMarker [2ms]
03-30 18:15:51.398 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.398 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.399 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.399 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.399 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.400 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.400 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.400 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.400 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.401 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.401 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.401 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.401 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.402 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.402 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.402 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.403 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.403 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.403 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.404 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.404 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.404 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.404 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.405 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.405 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.405 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.405 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.405 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.406 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.406 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.406 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.406 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.406 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.407 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.407 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.407 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.407 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.408 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.408 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.408 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.408 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.409 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.409 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.409 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.410 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.410 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.410 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.410 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.411 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.411 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.411 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.411 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.411 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.412 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.412 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.412 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.412 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.413 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.413 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.413 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.413 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.413 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.414 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.414 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.414 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.414 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.415 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.415 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.415 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.416 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.416 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.416 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.416 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.417 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.417 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.417 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.417 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.418 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.418 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.418 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.418 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.418 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.418 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.419 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.419 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.419 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.419 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.419 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.419 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.420 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.420 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.420 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.420 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.421 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.421 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.421 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.421 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.421 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.422 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.422 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.422 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.422 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.422 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.423 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.423 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.423 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.423 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.424 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.424 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.424 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.424 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.424 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.424 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.424 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.424 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.425 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.425 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.425 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.425 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.425 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.425 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.425 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.426 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.426 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.426 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.426 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.426 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.427 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.427 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.427 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.427 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.427 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.427 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.428 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.428 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.428 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.428 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.429 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.429 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.429 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.430 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.430 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.430 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.431 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.431 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.431 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.432 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.432 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.432 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.433 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.433 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.433 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.433 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.434 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.434 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.434 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.434 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.714 6399-6399/.../MapItem: ⇠ updateMarker [280ms]
03-30 18:15:51.715 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.715 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.715 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.716 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.716 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.716 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.716 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.717 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.717 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.717 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.717 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.718 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.718 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.718 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.719 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.719 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.719 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.723 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.724 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.724 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.724 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.724 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.725 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.725 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.725 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.725 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.725 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.726 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.726 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.726 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.726 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.727 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.727 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.727 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.727 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.727 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.727 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.728 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.728 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.728 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.728 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.728 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.728 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.728 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.729 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.729 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.729 6399-6399/.../MapItem: ⇢ updateMarker()
03-30 18:15:51.729 6399-6399/.../MapItem: ⇠ updateMarker [0ms]
03-30 18:15:51.729 6399-6399/.../MapPresenter: ⇠ changeAnnotations [344ms]
@mpuchala mpuchala changed the title [Android[ Update marker icon problem [Android] Update marker icon problem Mar 30, 2016
@jfirebaugh jfirebaugh added the Android Mapbox Maps SDK for Android label Mar 30, 2016
@mpuchala
Copy link
Author

After today's stable release (4.0.0) it seems to be ok... interesting thing but for now looks fine.

@tobrun
Copy link
Member

tobrun commented Mar 31, 2016

@mpuchala
Sorry for getting back to you just now.
Glad to hear the issues was resolved with the newer versions of our library.
I just want to mention that updating a marker position is a new feature landed in 4.0.0 and we are still working on this to make it more robust and performant. At this point changing location is a supported feature but animating this with Android SDK Animators (or changing position really quickly) is something we are working hard to improve. I'm planning in to do some performance tests similar to the ones you have been doing.

I'm going to leave this issue open and use this to track progression on above.

Thanks for reaching out and providing feedback!

@mpuchala
Copy link
Author

@tobrun
Actually it's about icon (image) not position.

Now I'm testing it once again and it works weird. As I said before there are about 150 markers, and I'm just updating icons in a loop. For sure there is no issue with creating images because those icons are static and I create them before updating. After my investigation problem is with mMarker.setIcon() method and I attached my log in the first post. Unfortunately problem occurs with new version (as it was with yesterdays snapshot).

My last #4534 (comment) can be misleading but probably I haven't rebuild project properly and I used rc.1 where it worked fine. I have no idea what was changed (maybe core code?) but at this moment updating icon seems to be useless (because of lag - up to 30s in my scenario). I'm really interested in this issue because it's one of the most important feature in our app and the most strange thing it was ok since beta I guess...

@mpuchala
Copy link
Author

mpuchala commented Apr 4, 2016

@tobrun
Looks like it works smooth again on current snapshot (04.04). Maybe it was related to #4553 or other change?

I guess it's close for now.

@shantanu-vyas
Copy link

@mpuchala I'm still noticing the issue on version snapshot 4.1.0. I haven't tried using multiple markers but updating the position of the marker causes (depends on update frequency) lag. I have 1 marker updating the location at a fixed time interval then attempt to pan the map, in doing so I notice lag occurring at the markers updating frequency.

@mpuchala
Copy link
Author

mpuchala commented Apr 7, 2016

@shantanu-vyas
As far as I know it's known issue about performance and guys from MapBox are trying to improve that. My problem was related to update icon image (it's broken in stable 4.0.0 version and fixed in current snapshot) not a position. Those things seems to be completely different. Is your problem about adding markers (#4581 (comment)) or updating their position?

If it's adding:

for (int i = 0; i < 100; i++) {
         map.addMarker(/*marker here*/);
       }

instead of that try to use

map.addMarkers(List<MarkerOptions> markerOptionses);

I'm using it with about 150 markers, 20 polygons and polylines at a time and it takes about 500-700 ms on Nexus 4.

If it's about changing position of marker it's (AFAIK) on the road map and doesn't work smooth yet (#4401).

Maybe my title isn't accurate but it's only about setting new icon/image to existing/added marker (without changing position).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

4 participants