Comments (3)
I had this similar issue the other day (as I was using the tag latest
for my testing and it automatically bumped to the latest version). I found out that the content-encoding has changed.
This is the response header in v0.11.6
And the response header in v0.13.0
If I force content-encoding
to gzip by adding "Accept-Encoding" to my request, the response time and the data size come back to normal.
from martin.
@ShadowSonata I think that's the culprit. I switched the default serving compression from gzip
to brotli
encoding (when the browser supports both and has not set a preference of one over the other). As you can see from your own example, you gained 20% on the content size. But that 20% doesn't come from nowhere - Brotli takes longer to compress.
So there are two ways to fix this, and both in theory could be used:
- add compression preference, e.g. a CLI param
--preferred-encoding (gzip|brotli)
and a similar global config file value. If the browser does not give differentq
values forbr
andgzip
in the Accept-Encoding header, Martin will pick one over the other. By default, Chrome setsAccept-Encoding:gzip, deflate, br
(default q=1.0 for all) - Martin tile cache contains pre-compressed values - i.e. the cache has the value as returned by the tile source. MBTiles usually stores gzipped tiles. Postgres usually returns uncompressed ones. This means that Martin compresses tiles on each response when tiles are coming from Postgres. The solution is to modify cache logic to store the tile after compressing it. This will make responses much faster except for the very first one (per tile coordinates).
from martin.
The individual issues #1178 and #1112 track both of the use cases. It should be fairly easy to do - and as always, I am more than willing to guide any newcomers if someone can step forward before I get to it in my limited volunteer time. Thx!
from martin.
Related Issues (20)
- Store hashing algorithm in the metadata table HOT 2
- How to add array and hstore columns type in properties
- Make PMTiles directory cache shared between files HOT 2
- Document using Martin as a AWS Lambda using PMTiles on S3, or another cloud provider HOT 2
- Fix flaky MacOS CI test, possibly using preinstalled Github's MacOS nginx instead HOT 2
- Cache tiles in ready-to-serve encoding
- Serving fonts while Martin is used with nginx returns HTTP 400
- Martin ล afรกล HOT 2
- Add web-based UI for Martin HOT 12
- maputnik v1.7.0, martin v0.12.0 serving OpenMapTiles osm-2020-02-10-v3.11_north-america.mbtiles
- My martin catalog is empty HOT 2
- Add cache configuration HOT 3
- Run Martin on subpath with Traefik proxy HOT 1
- Support docker compose plugin to justfile HOT 4
- Some `mbtiles` tool operations produce db or disk/machine out of space errors HOT 3
- Migrate MacOS CI to use new MacOS M1 runners
- Implement PMTiles S3 bucket support with authentication HOT 4
- Implement `--preferred-encoding (gzip|brotli)` configuration
- Add `--base-path` CLI option to override the URL path in the tilejson HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from martin.