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

Expose platform bindings for new OfflineManager APIs #239

Open
chloekraw opened this issue Mar 25, 2020 · 0 comments
Open

Expose platform bindings for new OfflineManager APIs #239

chloekraw opened this issue Mar 25, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@chloekraw
Copy link
Contributor

With mapbox/mapbox-gl-native#15899 and mapbox/mapbox-gl-native#15967, we optimized the offline region deletion and ambient cache clearing APIs in GL-Native.

Before, deleting an offline pack and clearing the ambient cache would automatically trigger the SQLite VACUUM operation (in mbgl's packDatabase()) to erase the resources from disk and free up space. This operation is computationally expensive and would block the main thread, sometimes also causing the app to hang or crash.

mapbox/mapbox-gl-native#15899 decouples VACUUM from those APIs and mapbox/mapbox-gl-native#15967 adds a new API, runPackDatabaseAutomatically(bool) , which allows the developer configure whether packDatabase() is run automatically with deleteRegion() and clearAmbientCache(). By default, the value is true, enabling this change to be backwards compatible.

cc/ @mapbox/maps-ios @1ec5 @pozdnyakov

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants