-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core] Calculate size of an ambient cache without offline region's resources #15622
Conversation
@tobrun @julianrex Documentation for darwin and Android has to be updated. Do you want to do it yourself in separate PR? Also, this is an API break, since the old behavior, is changed, and some apps may have a workarounds that resizes ambient cache every-time offline pack is downloaded. Not sure if worth making semver release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few nits
6dd778d
to
d9df88e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only concern I have about this approach is the ambient cache size reduction is precisely measure using the delta of number of pages but the growth is taking into consideration only the data
size.
Meaning that if we add and remove the same entry, the added size is always going to be smaller than the removed size, and in the long run the cache size will be zero.
d9df88e
to
acf4337
Compare
@tmpsantos Changed code a bit to get more precise ambient cache growth size, ptal. |
acf4337
to
fc7139e
Compare
In my opinion, if we flag this change clearly at the top of the changelog under a "Major improvements" section, this would be acceptable in a minor release. cc @mapbox/maps-android @mapbox/maps-ios @alexshalamov could you draft a changelog entry and I'll think about it and review? Thanks for picking this longstanding problem up! |
fc7139e
to
22a250d
Compare
14d4deb
to
c553b07
Compare
@julianrex @1ec5 @tobrun we are planning to release this fix in a next release (maps-v1.4.0) |
c553b07
to
c1afd2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % nits
c1afd2e
to
4ee189b
Compare
4ee189b
to
dae65f6
Compare
bd4bb53
to
765c75f
Compare
Resources that belong to an offline region, should not contribute to the amount of space available in the ambient cache.
Fixes: #4411
Fixes: https://github.com/mapbox/mapbox-gl-native-team/issues/212