-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Cache tiles in ready-to-serve encoding #1112
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current State
Since v0.13, Martin caches tile data as it comes back from the individual sources (PG/mbtiles/pmtiles). This means that if mbtiles contains gziped-compressed MVT tiles, cache will contain that tile, and no re-compression will be needed. If PostgreSQL generates an uncompressed tile, the tile will be cached, but each tile request has to gzip that tile anew. This is the usual case unless user has a custom PG function that uses a gzip extension to compress the tile on the database side.
Goals
Solutions
Brotli vs Gzip
Per Brotli wiki, it offers significantly better rate of compression and decompression performance than gzip. Desktop Chrome current default Accept-Encoding is
gzip, deflate, br
(tested on Linux with latest Chrome). Reading Quality_values seem to indicate that the order of the values is irrelevant as long as they have the same "q" value (default is 1), which means that the"gzip, deflate, br"
string indicates it is OK to send back Brotli, even though it is 3rd in the list. Obviously ifbr
is not in the list, it will have to begzip
oridentity
.The text was updated successfully, but these errors were encountered: