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

Backgrounding the app defeats caching #1320

Closed
1ec5 opened this issue Apr 21, 2015 · 5 comments
Closed

Backgrounding the app defeats caching #1320

1ec5 opened this issue Apr 21, 2015 · 5 comments
Labels
iOS Mapbox Maps SDK for iOS performance Speed, stability, CPU usage, memory usage, or power usage

Comments

@1ec5
Copy link
Contributor

1ec5 commented Apr 21, 2015

If you send the host app to the background and bring it back to the foreground, all visible tiles are forcibly reloaded, HTTP requests and all. At best, the entire map appears to flash in and out. At worst, tiles go AWOL until they’re refetched and rerendered.

Source::update() calls addTile(), which creates a new VectorTileData and calls TileData::request() because the cache introduced in #1255 is empty. It might be worth noting that backgrounding and foregrounding the app causes Map::stop() and start() to be called, respectively.

/cc @ansis @incanus

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS performance Speed, stability, CPU usage, memory usage, or power usage labels Apr 21, 2015
@jfirebaugh
Copy link
Contributor

Not sure of the current status, but on the 1065-separate-ui-from-map-thread branch, Map::stop() shuts down the rendering thread completely, which basically deallocates everything.

I'm not sure anyone understands the current backgrounding/foregrounding strategy. I've never been able to get anyone to write up an explanation anyway.

@1ec5
Copy link
Contributor Author

1ec5 commented Apr 21, 2015

ref #1065

@incanus
Copy link
Contributor

incanus commented Apr 21, 2015

I'm not sure anyone understands the current backgrounding/foregrounding strategy. I've never been able to get anyone to write up an explanation anyway.

I think @kkaefer might, and I know much of this is complicated by various orders of things happening between iOS and Android for these sequences.

@jfirebaugh
Copy link
Contributor

ref #678

@jfirebaugh
Copy link
Contributor

Fixed in #1065.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS performance Speed, stability, CPU usage, memory usage, or power usage
Projects
None yet
Development

No branches or pull requests

3 participants