You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
[ios] Displaying tiles on map is blocked by offline pack operations #8756
Pan and zoom around the map while the download is initiating
Expected behavior
Tiles will fetch and load
Actual behavior
No tiles are loaded until the download has started. If you pause the debugger, the DefaultFileSource runloop is busy in OfflineDownload::queueTiles for minutes
Even after the download has initiated, the map performance is poor. Fetching predownloaded tiles because requests to retrieve the tile from the database are queued behind offline download requests. I tried to add a priority queue to the runloop to address that issue, which helps some, but doesn't mitigate that long running operations such as queue tiles, and OfflineDatabase::getRegionCompletedStatus block the whole runloop.
You can view my attempt at the priority queue here - trailbehind#14
I am considering trying to split the DefaultFileSource runloop into two runloops, one loop would be solely responsible for fetching tiles for immediate display on the map. The other loop would do all operations for offline regions and evictions. It possibly could also save tiles to the database that were fetched for immediate display.
I'd appreciate any feedback on that approach, or other ideas!
I worked on this today, and have a proof of concept pull request that seems to work well, though is obviously not polished code. Any feedback on this would also be appreciated. Especially on handling the mutex in canceling the request in WorkTask. The mutex blocks the main thread often with the dual threads for DefaultFileSource.
Activity
wibge commentedon Apr 18, 2017
I worked on this today, and have a proof of concept pull request that seems to work well, though is obviously not polished code. Any feedback on this would also be appreciated. Especially on handling the mutex in canceling the request in WorkTask. The mutex blocks the main thread often with the dual threads for DefaultFileSource.
https://github.com/trailbehind/mapbox-gl-native/pull/15/files
lilykaiser commentedon Sep 10, 2018
This is now being tracked in #12655. Closing this ticket as a duplicate.