Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
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

Closed

Description

@incanus

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.

screen shot 2016-07-25 at 12 00 44 pm

/cc @1ec5 @boundsj

Activity

  1. added
    iOS
    performance
    annotations
    on Jul 25, 2016
  2. 1ec5 commented on Jul 25, 2016

    @1ec5
    Contributor

    -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.

  3. added this to the ios-v3.4.0 milestone on Jul 25, 2016
  4. incanus commented on Jul 25, 2016

    @incanus
    ContributorAuthor

    Ah nice, good that we're tracking this already. Will leave this open as a todo. 👍

  5. self-assigned this
    on Aug 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

annotationsbugiOSperformance

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions