This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Don't reload/reparse tiles after app gets backgrounded #1154
Labels
Android
Mapbox Maps SDK for Android
iOS
Mapbox Maps SDK for iOS
performance
Speed, stability, CPU usage, memory usage, or power usage
refactor
We're currently reloading and reparsing the tiles once the app gets backgrounded on iOS (and Android for that matter). This is because the
Style
object gets deleted, which clears out all loaded tiles. While the vector tile itself is most likely cached, we still have the overhead of reparsing all of the tiles.Instead, we should hold on to the parsed buffers as long as possible (and possibly relinquish them when we get a memory warning, see #1157) and when reloading, check whether we still have a buffer object around that matches that layer's settings.
The text was updated successfully, but these errors were encountered: