Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inflate tiles natively #13

Open
jpilet opened this issue Jan 31, 2018 · 1 comment
Open

inflate tiles natively #13

jpilet opened this issue Jan 31, 2018 · 1 comment

Comments

@jpilet
Copy link
Contributor

jpilet commented Jan 31, 2018

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

@oscarfonts
Copy link
Owner

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? ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants