Repository navigation
Conversation
|
@naluhh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @boundsj, @1ec5 and @friedbunny to be potential reviewers. |
|
Thanks again for your PR @naluhh. I went with the implementation in #5987 because we wanted a solution that relies on the more efficient query mechanism in the mbgl (C++) core. Also, I wanted to stay away from implementations that rely on changing the visibility of the UIView objects. I was also concerned about using a set for the queue since we would not want to store only distinct views based on a hash -- we want to be able to reuse any view that has been created previously. I understand this PR also introduced a new public API on Thanks again! |
This PR adresses the following issue:
What changed ?
updateAnnotationViews was not working properly. The delegate method was called on each frame even if it wasn't in the view work. As a result, performance were worse when an annotation was outside the screen (!).
The reuse queue was also an NSArray instead of a NSSet resulting in poor performance when picking inside.
This PR improve the performance of the updateAnnotationViews especially when you are using complicated views.
One possible improvement to this would be to use queryPointAnnotations, but it's too slow when there is a lot of annotations on the screen.
Testing done
I tested with thousand views and CAAnimation spread across the world with much better performances.
cc @1ec5