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

[ios] Fix for user puck jittering (and annotations lagging) - #12895

Merged
julianrex merged 6 commits into
masterfrom
jrex/12740-user-dot-jitters
Sep 26, 2018
Merged

julianrex merged 6 commits into
masterfrom
jrex/12740-user-dot-jitters

Conversation

@julianrex

Copy link
Copy Markdown
Contributor

This PR addresses #12740 and #5489.

Moving UIKit position updates prior to rendering and enabling CAEAGLLayer.presentsWithTransaction (introduced in iOS 9) appears to have addressed both these issues.

Running through Instruments show performance hasn't changed dramatically (perhaps even slightly improved), but I'd like to see some additional testing. My main concern is does the user puck behave the same as it used to (not "is it lagging")?

(I'd like to see some additional improvements to how core performs updates, but this is beyond the scope of this fix/PR.)

@julianrex julianrex added the iOS Mapbox Maps SDK for iOS label Sep 14, 2018
@friedbunny

Copy link
Copy Markdown
Contributor

Haven’t played with this yet, but I’m excited to see us finally looking again at CAEAGLLayer.presentsWithTransaction — back when iOS 9 was in beta we were mildly excited about it.

Of course, it’s been deprecated in iOS 12... 🙃

Comment thread platform/ios/src/MGLMapView.mm Outdated
_glView.layer.opaque = _opaque;
_glView.delegate = self;

// `CAEAGLLayer.presentsWithTransaction` was introduced in iOS 9.

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.

Since this project requires iOS 9, it feels unnecessary to include this comment (as it’s implied globally).

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.

Left for @jmkiley

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.

Would it be more useful to keep track of backwards compatibility at the PR-level — as a project, perhaps? This comment hints at the larger change here, but doesn’t help a reader outside of the context of this PR.

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.

Agreed. Will discuss.

@friedbunny friedbunny added the performance Speed, stability, CPU usage, memory usage, or power usage label Sep 14, 2018

@fabian-guerra fabian-guerra left a comment

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.

LGTM. Have you used instruments to measure the impact? Besides puck/annotations, which other components may be affected?

@julianrex

Copy link
Copy Markdown
Contributor Author

@fabian-guerra yes, Instruments showed no significant changes (if anything it looked like a slight improvement, but this was probably in the margin of error).

In terms of other effects, I'd be most concerned about annotations and their callouts, but testing so far seems to show these are stable.

@friedbunny friedbunny added the needs changelog Indicates PR needs a changelog entry prior to merging. label Sep 26, 2018

@friedbunny friedbunny left a comment

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.

I can’t really tell if this fixed the issue, but it also hasn’t regressed anything that I can find — running my view annotations benchmark gauntlet shows that performance is the same/within the margin of error.

@julianrex
julianrex force-pushed the jrex/12740-user-dot-jitters branch from f8c1f66 to 677b1e2 Compare September 26, 2018 02:21
@julianrex julianrex removed the needs changelog Indicates PR needs a changelog entry prior to merging. label Sep 26, 2018
Comment thread platform/ios/CHANGELOG.md Outdated

* Added an `MGLSymbolStyleLayer.symbolZOrder` property for forcing point features in a symbol layer to be layered in the same order that they are specified in the layer’s associated source. ([#12783](https://github.com/mapbox/mapbox-gl-native/pull/12783))
* Fixed a crash when a style layer `*-pattern` property evaluates to nil for a particular feature. ([#12896](https://github.com/mapbox/mapbox-gl-native/pull/12896))
* Fixed an issue with annotations (including the user's location puck) and the GL map lagging relative to each other. ([#12895](https://github.com/mapbox/mapbox-gl-native/pull/12895))

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.

with annotations

Let’s specify “with view annotations”, as we have severals sorts of annotations.

user's location puck

We always call this the “user location annotation”.

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

Labels

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