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

refs 654f015: bring back sprite-backed annotation option for comparison - #5786

Closed
incanus wants to merge 3 commits into
masterfrom
654f015-sprite-annotations
Closed

incanus wants to merge 3 commits into
masterfrom
654f015-sprite-annotations

Conversation

@incanus

@incanus incanus commented Jul 25, 2016

Copy link
Copy Markdown
Contributor

Background in 654f015#commitcomment-18366764.

We should have sprite-backed annotations as an option still for comparison to view-backed until such time that view-backed performance is equal or of negligible difference.

This more or less reverses 654f015, though it doesn't bring back -mapView:didDeselectAnnotation:, of which I'm not sure what the point was—something about changing to pins if we don't have a sprite to reuse? Open to feedback here.

Subjectively, since last being in this code, I am noticing a pretty marked performance decrease for annotation sprites, possibly related to z-ordering that I see happening during map rotation. Might be something else. I'm going to profile out of curiosity separately from this—this PR is just about the functionality. But these should be a lot faster.

/cc @1ec5 @boundsj

@incanus incanus added iOS Mapbox Maps SDK for iOS performance Speed, stability, CPU usage, memory usage, or power usage annotations Annotations on iOS and macOS or markers on Android labels Jul 25, 2016
@mention-bot

Copy link
Copy Markdown

@incanus, thanks for your PR! By analyzing the annotation information on this pull request, we identified @1ec5, @friedbunny and @boundsj to be potential reviewers

incanus referenced this pull request Jul 25, 2016
Removed unused annotation image code from iosapp, now that bulk-added point annotations are backed by annotation views.
annotation.coordinate = coordinate;
annotation.title = title;
annotation.subtitle = [NSString stringWithFormat:@"View: %i", useViews];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using a magic string to detect a view-backed annotation, subclass MGLPointAnnotation and check whether it’s a kind of that subclass below. The class check is slightly more efficient than a string comparison and more self-documenting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, was thinking about that but trying to avoid overhead of a class. Probably a good idea, though.

@incanus

incanus commented Jul 26, 2016

Copy link
Copy Markdown
Contributor Author

Merged manually into master after rebase as of 4e61b2e.

Sorry, forgot the [ios] out front; will get that next time.

@incanus incanus closed this Jul 26, 2016
@incanus

incanus commented Jul 26, 2016

Copy link
Copy Markdown
Contributor Author

Forgot to force push this into the branch after rebase; remedied as of 4e61b2e.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

annotations Annotations on iOS and macOS or markers on Android iOS Mapbox Maps SDK for iOS performance Speed, stability, CPU usage, memory usage, or power usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants