TileMill Now Twice as Fast

Blog

Estimated
2 min read

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.

da9ff6e7ccc4  0id9K9yATtoGXLhs7

The map rendering module used in TileMill, [tilelive-mapnik](https://github.com/mapbox/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.

da9ff6e7ccc4  0z7bIbsbN3VFSnDuc

We’re seeing rendering speeds twice as fast in the new release of TileMill as in the last version. For example, the map of our DC headquarters previously took three and a half minutes to render, and now it takes just under one and a half minutes.

This, along with the TileMill’s new one step installers, will make it faster and simpler to design custom maps. We’re also working on ways to make it easier to use custom maps online through map sharing and embed codes in our TileStream map hosting service. Check out my previous blog post on this for more details.

To get started with TileMill, download it and check out documentation at support.mapbox.com.

What we're doing.

Latest