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.
unnecessary performance overhead for non-view annotations on iOS #5787
annotationsAnnotations on iOS and macOS or markers on AndroidbugiOSMapbox Maps SDK for iOSperformanceSpeed, stability, CPU usage, memory usage, or power usage
Looking separately into the perf issues mentioned in #5786, it seems that -[MGLMapView updateAnnotationViews] is called as a result of -[MGLMapView notifyMapChange]. This appears to run through every annotation on every frame update, doing unnecessary logic for annotations which are sprite-backed. In my testing of an entirely sprite-backed map, I am getting about 16% of time profiling spent on rendering the whole map and the same amount just to run through -[MGLMapView convertCoordinate:toPointToView:] when this is completely unnecessary for thousands of annotations.
-updateAnnotationViews iterates over all the annotations, not just view-backed annotations and not just the annotations within the viewport. #5165 would provide a more reliable way to query for annotations in the current viewport than what we have now. Moving over to that new API should eliminate all the coordinate conversions when none of the annotations are view-backed.
annotationsAnnotations on iOS and macOS or markers on AndroidbugiOSMapbox Maps SDK for iOSperformanceSpeed, stability, CPU usage, memory usage, or power usage
Activity
1ec5 commentedon Jul 25, 2016
-updateAnnotationViewsiterates over all the annotations, not just view-backed annotations and not just the annotations within the viewport. #5165 would provide a more reliable way to query for annotations in the current viewport than what we have now. Moving over to that new API should eliminate all the coordinate conversions when none of the annotations are view-backed.incanus commentedon Jul 25, 2016
Ah nice, good that we're tracking this already. Will leave this open as a todo. 👍