-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Performance issues with hundreds of offline packs #6651
Comments
By adding tiles_count and tiles_size to the regions-table, getCompletedTileCountAndSize got a 1 minute and 15 second speedup on an old iPad 2 with 800+ offline regions and around 800MB of tiles. Do you think adding those fields to the regions table would be okay? Or is it not acceptable to double-store such information? |
Updated status.
I am using the resource cache and the faster getCompletedTileCountAndSize in my app to get acceptable performance. Hopefully, the future will bring a better solution. @jfirebaugh mentioned that #4106 with a MultiPolygon could be an alternative to using lots of separate regions. It might work, but my offline regions change in location and number from time to time. |
Thank you for your contributions! Following. |
I have given up offline packs for my app and moved over to server generated tile archives following the same sqlite schema as cache.db as recommended in #3894. I have added two methods to MGLOfflineStorage that inserts resources and tiles async and given control of the evict to the app according to my suggestion at #7195. This is working very well for my app. It is now several times faster for the user to download tiles and resources for a predefined area. The huge cpu/io cost of gathering statistics at startup are also gone. |
Now that #11447 has landed, it may be more efficient for you to create one offline pack that covers a multipolygon than to create lots and lots of offline packs, since there’s probably a nontrivial overhead to creating a pack in the first place. |
@1ec5 Hi, I'm having performance issues downloading too many offline regions, could you please share some example of the multipolygon approach? |
Platform: iOS
Mapbox SDK version: latest from master
Steps to trigger behavior
Expected behavior
Acceptable performance.
Actual behavior
Having lots of offline packs for a small number of styles are very slow for a number of reasons. Here are the main issues I have found with profiling and experimenting.
The text was updated successfully, but these errors were encountered: