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

Optimise icon management #9643

Merged
merged 1 commit into from
Aug 10, 2017
Merged

Optimise icon management #9643

merged 1 commit into from
Aug 10, 2017

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Jul 28, 2017

closes #7343

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Jul 28, 2017
@tobrun tobrun added this to the android-v5.2.0 milestone Jul 28, 2017
@tobrun tobrun self-assigned this Jul 28, 2017
@tobrun tobrun requested a review from zugaldia July 28, 2017 17:00
@tobrun
Copy link
Member Author

tobrun commented Jul 31, 2017

been adding tests to potentially cherry pick this PR to release branch, been hitting some compability issues with android OS versions. KitKat and below suffer from a bitmap recycling issue. For now I'm going to turn off recycling for these OS versions.

FYI:

This is memory consumption with Bitmap recycling:

screenshot at 2017-07-31 14 03 22

This is consumption without recycling:

screenshot at 2017-07-31 14 02 11

@tobrun tobrun force-pushed the 7374-update-marker-remove-icon branch from 60db535 to 92c9f90 Compare July 31, 2017 14:21
@zugaldia
Copy link
Member

Great improvement.

This is memory consumption with Bitmap recycling:

What was the scenario in this case (how many icons, size...). Wondering if we could estimate an approximate percentage of memory saved by this change for a typical scenario.

@tobrun
Copy link
Member Author

tobrun commented Jul 31, 2017

What was the scenario in this case (how many icons, size...).

Shown graph is after having executed all the tests from IconTest.java (at that time it was 5 or 6 tests). This means we have created 5-6 different Activities with each Activity having it's own map and icons. The lowering of memory = recycling of bitmaps.

Wondering if we could estimate an approximate percentage of memory saved by this change for a typical scenario.

Memory saved is the same as the memory footprint of the bitmap released.

@tobrun tobrun force-pushed the 7374-update-marker-remove-icon branch from 92c9f90 to eda8e5c Compare August 1, 2017 06:46
@tobrun
Copy link
Member Author

tobrun commented Aug 10, 2017

@zugaldia could you review this? Would love get this in master so we can kick the tires on it.

@tobrun tobrun merged commit 6fce6bb into master Aug 10, 2017
@Guardiola31337 Guardiola31337 mentioned this pull request Oct 6, 2017
20 tasks
@Guardiola31337 Guardiola31337 mentioned this pull request Oct 19, 2017
20 tasks
@jfirebaugh jfirebaugh deleted the 7374-update-marker-remove-icon branch October 24, 2017 20:42
@Guardiola31337 Guardiola31337 mentioned this pull request Oct 26, 2017
20 tasks
@tobrun tobrun mentioned this pull request Nov 3, 2017
21 tasks
This was referenced Nov 14, 2017
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.

Update Marker Icon doesn't result in AnnotationManager::removeAnnotationIcon
2 participants