mapbox-gl-native icon indicating copy to clipboard operation
mapbox-gl-native copied to clipboard

OfflineManager does not detect shared resources between offline packs with parallel downloads

Open sedot42 opened this issue 4 years ago • 0 comments

Hi, I am experiencing a potentially expensive issue where I want the user to be able to use several styles offline that all use the same data source. As per Mapbox docs those offline packs should be able to share resources, but when I create the offline packs asynchronously in parallel, tiles are being downloaded multiple times, resulting in higher API usage.

Platform: React Native Mapbox SDK version: 9.1.0

Steps to trigger behavior

  1. Create two offline packs in parallel (async) with different custom styles that use the same tileset as their data source.

Expected behavior

  1. completedTileCount for one pack is about 120.
  2. Check account statistics and see that 120 tiles have been downloaded.

Actual behavior

  1. completedTileCount for one pack is about 120.
  2. Check account statistics and see that 240 tiles have been downloaded.

sedot42 avatar Sep 01 '21 15:09 sedot42