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

Add style image missing binding integration #14320

Merged
merged 1 commit into from
Apr 15, 2019
Merged

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Apr 3, 2019

closes #14319, refs core integration in #14253 and iOS integration in #14302.

  • add java public api
  • add c++ integration
  • add test around sample
  • integrate small example in test app

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Apr 3, 2019
@tobrun tobrun added this to the release-m milestone Apr 3, 2019
@tobrun tobrun self-assigned this Apr 3, 2019
@tobrun tobrun force-pushed the tvn-onstyleimagemissing branch 3 times, most recently from b98f4e9 to a55a121 Compare April 3, 2019 22:48
@tobrun tobrun requested review from LukasPaczos and ansis April 4, 2019 07:39
Copy link
Contributor

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

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

Looks great, just a couple of questions and nitpicks.

@tobrun
Copy link
Member Author

tobrun commented Apr 4, 2019

To resolve multiple callback invocations, I looked into profiling the usefulness of back grounding the image conversions. Test were performed with simple map activity and adding 20 images to the style. The profiler for CPU and memory didn't really show an actionable difference. The execution time of non async addition of images was faster for the map to become idle.

The GPU profiler does show a small difference, you can see that the third bar in the images below is higher for the async variant as there is overhead created by the 20 asynctasks.

image

image

When using the addImages overload that only spawns 1 asycntask for 20 images, the results are not improved.

image

Atm, not seeing an actual evidence that the background conversion is actually usefull.

@LukasPaczos
Copy link
Contributor

🤔 What device did you use for testing? High-end devices might disguise the slowdown.

@tobrun
Copy link
Member Author

tobrun commented Apr 5, 2019

Nokia 1 sync async
Style#addImages addimagesyncnokia1 add-all-nokia-1async
Style#addImage addimage-nokia1 addimageasync-nokia1

@tobrun
Copy link
Member Author

tobrun commented Apr 5, 2019

Capturing from chat, moving forward with both exposing synchronous as asynchronous addImage overloads on Style. With this in place no additional bookkeeping is required to use the image missing callback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Android binding integration for onStyleImageMissing
2 participants