Repository navigation
Conversation
Add an optional MLT writer, built with -DTILEMAKER_WITH_MLT=ON and selected with "tile_format": "mlt". The tile writing code is templated over an MVT (vtzero) and an MLT backend; MLT tiles are encoded with the maplibre-tile-spec C++ encoder, fetched at a pinned commit. - PMTiles tile type 0x06, MBTiles format=mlt, .mlt directory output - feature order (ZOrder) preserved; mixed int/float columns kept numeric - fast encoder settings for compressed output - CMake build moves to C++20, with fixes for Boost 1.74 Asio and the bundled sqlite_modern_cpp; Dockerfile and Linux CI build with MLT Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
perf: 3.4x faster on the full planet, 3-4.5x on extracts, much less RAM, deterministic output
Full planet: 2 h 10 min -> 38 min 38 s (3.4x faster), 4x less CPU time, 96 GB less peak RAM. On extracts: 3-4.5x faster and 11-20x less peak memory. The tiles are the same apart from a few 1-2 unit vertex shifts (see Output).
Full planet
Setup: OpenMapTiles profile (
resources/config-openmaptiles.json+process-openmaptiles.lua) with coastline and landcover shapefiles, PMTiles output, in memory (no--store), default thread count. Server: AMD EPYC 9454P (48 cores / 96 threads), 503 GB RAM, Ubuntu 22.04, GCC 11.4. Measured with/usr/bin/time -v, one run per version, back to back on an otherwise idle machine. Both runs wrote all 345,907,442 tiles and exited cleanly.Part of the planet RAM saving comes from closed ways that are only wrongly oriented. These are now kept as reversed references into the way store, instead of being repaired and stored as separate generated polygons: "Generated polygons" in the log falls from 300M to 7.6M.
Extracts
Total CPU time also falls 1.5-1.8x, so the speedup is not just better use of cores; the work itself shrank.
Measurement: interleaved A/B runs (6 pairs per extract) against the parent commit, after a discarded warm-up run. Setup: OpenMapTiles profile, gzip MVT to .mbtiles, 22-thread laptop (Core Ultra 7 165H). Times and RAM are medians.
Output
--threadsvalues differed in up to ~200 Luxembourg tiles, because what the ClipCache held depended on scheduling. Tiles are now split into fixed batches, each with its own clip cache.--threadsvalues already caused differences of this kind before.--materialize-geometries,--store,--shard-storesand--threads 1.Main changes
M_TRIM_THRESHOLDis set unless the user tunes malloc through the environment.boost::geometry::is_valid. Boost still runs whenever the precheck is unsure.test()per tile.Find/Holds/Attribute*/MinZoom/ZOrderare nativelua_CFunctions that keep kaguya's argument-type rules. Eachlua_Stategets a size-class pool allocator.Fast paths were cross-checked against the original code paths in
TMOPT_VERIFYbuilds (not part of this PR) on several extracts.Not tested
--storemode (only in-memory planet runs were timed).🤖 Generated with Claude Code