Note
This is the third beta of Martin 2.0. It has three breaking changes relative to 2.0.0-beta.2, listed below.
If you are coming from 1.x, read the migration guide first.
Breaking changes
- The prebuilt x86_64 binaries, Debian package and Docker images require an x86-64-v3 CPU (AVX2, BMI2, FMA; Intel Haswell or AMD Excavator, 2015 or newer) (#3464). See migration.
- Some cargo features were merged to save CI time and reduce complexity.
fonts,spritesandstylesare nowresources,hillshade,contourandgeojsonare nowprocessingwhilemltis always on (#3466). Only builds that pass--featuresor--no-default-featuresneed to change. See migration. - Rendered PNG tiles and static images are indexed (palette) PNGs instead of RGBA, about a quarter of the size on basemap tiles (#3456).
Bytes andETags change once on upgrade. Setstyles.rendering.png_palette: falsefor the previous output, orpng_palette: { max_colors: 64 }to tune the palette (2 to 256, default 128).
Added
- Rendered tiles answer
{y}@{n}x.{format}for HiDPI clients such as Leaflet's{r}.styles.rendering.max_pixel_ratio(default 4) boundsn(#3453). styles.rendering.tile_sizerenders 256 or 512 px tiles (default 512) (#3457).- Each tile worker keeps up to
styles.rendering.renderers_per_workerrenderers (default 8), so serving several styles no longer reloads a style on almost every request (#3454).
Every loaded renderer holds its own memory. Lower the value, ormax_pixel_ratio, to save memory. martin cpgets better performance viaMbtilesBulkWriter(#3496).
Fixed
- PMTiles object store log lines name the source they belong to (#3502).
martin cpwithout--bboxcopies the source's bounds again instead of the whole world, as--helpsays. It has done the latter since 1.1.0 (#3489).martin cprefuses an inverted--bboxwith an error instead of panicking (#3497).martin cpexits right after Ctrl+C instead of waiting out a 10 s drain timeout and losing the unsaved batch (#3498).- Tile responses send
Vary: Accept-Encoding, so shared caches such as nginx no longer hand one client's encoding to everyone (#3520). - A tile request answers
304when a proxy has weakened theETag(W/"...") (#3521). - A font stack takes each shared character from its first font. Before, MapLibre drew them in the last one (#3524).
- MLT tiles are no longer detected as MVT, which broke the catalog, the web UI inspector and
Accept: application/vnd.maplibre-tile(#3486), nor as JPEG XL, which stopped MBTiles files from loading (#3522). - Martin no longer crashes with SIGBUS, or serves the wrong bytes, when a served PMTiles archive is rewritten in place (#3487).
- A remote PMTiles source whose leaf directories moved reloads instead of failing with
Invalid gzip header(#3450).
Performance
- Composite tiles (
/a,b/{z}/{x}/{y}) are cached in the encoding the client receives instead of being merged and compressed on every request. CPU per request went from 2,504 µs to 72 µs on a Berlin extract. Each composite takes one more cache entry per encoding (#3523). - Font glyph ranges are cached compressed. CPU per request dropped from 553 µs to 38 µs for gzip, and bodies are smaller (#3472).
martin cpwrites MBTiles with the bulk writer. Copying 349,525 PNG tiles into a dedup-id file went from 218 s to 76 s (#3500). MBTiles inserts also hash each tile once instead of three times (#3474).- Local COG tiles are read from one open file handle, which cut CPU per tile from 102 µs to 35 µs for JPEG COGs (#3477).
- Decoded and re-encoded tiles carry no spare buffer capacity, which reduces tile cache memory by about 17% (#3473).
- Rendered images are encoded off the actix workers (#3460), and source resolution and
Acceptparsing allocate less per request (#3467, #3468).