Render and design custom maps faster in the latest release of TileMill
The latest release of TileMill makes it significantly faster to render and design custom maps. The biggest speed improvement comes from taking advantage of “metatiling”, which increases rendering speeds by about 20-30%.
Metatiling works by rendering multiple tiles as one larger image, and then slicing it into the standard map tile size. Tiles in a MBTiles file – the map storage file format used in TileMill – are 256 × 256 pixels, but often the data visible in a tile spans multiple tiles (think streets that are longer than one tile). With metatiling we render multiple tiles as one big image, only loading the data once, and then slice the large tile into 256 × 256 tiles.
Metatiling works by slicing up a large tile into 256×256 tiles
The map rendering module used in TileMill, tilelive-mapnik, has also gotten faster, and can now use multiple CPUs more efficiently by running image encoding tasks in separate threads. This means that, given your computer has more than one CPU core, more tiles can be rendered simultaneously. By default node.js uses up to four threads, allowing up to four cores to be used at a time. Powerful machines like our upcoming MapBox appliance have more cores than that. To better utilize these we created the node-eio module to alter the number of threads that node.js and tilelive-mapnik can use. With this change, we’re able to use the appliance’s eight cores very effectively.