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

Optimize animated annotations - #5385

Merged
jfirebaugh merged 4 commits into
masterfrom
animated-annotation
Jun 17, 2016
Merged

jfirebaugh merged 4 commits into
masterfrom
animated-annotation

Conversation

@jfirebaugh

Copy link
Copy Markdown
Contributor

I added an "Add Animated Annotation" menu item in the macOS test app, and then profiled it, which revealed several gross inefficiencies. After fixing those, the profile is heavily dominated by rendering performance -- updating the annotation is less than 3% of runtime.

@tobrun, can you test this out on Android?

/cc @1ec5 for macOS test app changes.

Comment thread platform/macos/app/MapDocument.m Outdated

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.

The time interval is 0 since no floats are involved.

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.

It was copied from dropManyPins:. I'll fix both occurrences.

@tobrun

tobrun commented Jun 17, 2016

Copy link
Copy Markdown
Member

@tobrun

tobrun commented Jun 17, 2016

Copy link
Copy Markdown
Member

I'm having some issues bringing this from master to the release-v4.1.0. We have diverged a lot and I'm not sure which core pieces I need to pick and which to ignore.

To test, I reversed the approach and cherry picked the animating car example from release-v4.1.0 into this branch:

ezgif com-video-to-gif 8

Here is also an example with +100 markers:

ezgif com-video-to-gif 7

cc @cammace @ivovandongen @pveugen @zugaldia

@jfirebaugh

Copy link
Copy Markdown
Contributor Author

Ported by hand to the Android release branch in animated-annotation-android-4.1.0. @zugaldia can you test?

@zugaldia

Copy link
Copy Markdown
Member

@jfirebaugh This is the AnimatedMarkerActivity without your changes in the current release branch:

without

This is the same activity brought to your animated-annotation-android-4.1.0 branch:

with

Bottom line, your port is improving substantially the performance. Let's merge it into the release branch 👍 .

@zugaldia

Copy link
Copy Markdown
Member

@jfirebaugh Bringing animated-annotation-android-4.1.0 over to the release branch via #5392.

@jfirebaugh
jfirebaugh force-pushed the animated-annotation branch from 1e2d0fb to 2921127 Compare June 17, 2016 18:41
@jfirebaugh
jfirebaugh merged commit 2921127 into master Jun 17, 2016
@jfirebaugh
jfirebaugh deleted the animated-annotation branch June 17, 2016 19:51
@cammace

cammace commented Jun 17, 2016

Copy link
Copy Markdown
Contributor

getting a bunch of

06-17 15:42:25.385 718-718/com.mapbox.mapboxsdk.testapp D/mbgl: [JNI]: nativeUpdateMarker

output in logcat which makes it impossible to read without filtering. Anyway we could remove this from printing?

@tobrun

tobrun commented Jun 24, 2016

Copy link
Copy Markdown
Member

@cammace you can disable this type of logging if you build with BUILDTYPE=Release

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants