Open jpilet opened 6 years ago
In previous versions the decompression was made in a worker thread: https://github.com/oscarfonts/mapbox-gl-cordova-mbtiles/blob/v0.0.6/src/mbtiles_worker.js#L10
A later contribution merge moved the decompression to the main thread, and there it is. It may be a good idea to move the decompression back to the worker.
Indeed, it would be even better to support native decompression. Would you give it a try? ;)
currently, tiles are decompressed from the sqlite database in the main javascript thread.
It would be faster to decompress natively using a cordova plugin, or even a sqlite C function.
The inflate call is here https://github.com/oscarfonts/mapbox-gl-cordova-mbtiles/blob/master/src/mbtiles_source.js#L93