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>
|
Very neat set of changes, thank you. I observed less of a speedup but then my machine is rather less powerful and fairly IO-constrained: the UK (RAM-resident) went from 4m33 to 3m14, Europe (RAM-resident) went from 1hr11 to 58m, the planet (with Could you take out the code guarded by @laem @etienneJr If you have time to check out this PR I'd be really interested to hear your experiences - it looks like it could be a handy speedup for cartes.app. |
|
These two PR are great ! We get slightly faster tiles to transfer with MLT, faster decoding, and faster generation with less RAM. This is especially cool because RAM is on shortage. Our cloud provider (Scaleway) has a shortage of 384 Gb or RAM compute machines. Will test as soon as possible, thanks for the mention. |
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