[OSM-dev] recursion added to render_list

Christian Quest cquest at openstreetmap.fr
Sun Jul 20 10:10:04 UTC 2014


I've talked about this idea with some of you at last SOTM and SOTM-EU.

The idea is to have render_list taking advantage of disk cache by rendering
tiles in a more "pyramidal" way than the actual full horizontal.

1) better use of disk cache to reduce disk I/O needs

Up to now, render_list renders a tile at zoom N but when getting to zoom
N+1, most of the needed data are usually the same but not in the disk cache
anymore causing a lot of I/O when rendering several zoom level.

With my changes, render_list immediately enqueue the 4 underlying N+1 tiles
(at the top of the queue). This allows to reduce disk I/O by taking
advantage of the caches still containing most of the needed data.

That's fine but where should be stop recursion ?


2- pre-render only what's worth prerendering...

For this I've added a rendering time limit.

If a metatile takes less than this limit, it is not worth pre-rendering it
as it will be quickly generated if requested.
This allows to limit recursion and at the same time pre-render what can be
done fast enough upon request.


To use this new feature, I'v only added on option to render_list to control
the rendering time limit (in ms). With it, its behavior is unchanged.


Example:
render_list -m osm -a -f -z 9 -Z 9 --max-time 5000


On my todo list:
- when rendering several zoom levels (example: -z 9 -Z 12), check if a
metatile has not been already recursively rendered by comparing its
timestamp to the render_list start time

- add a maximum zoom limit (for the moment recursion can go down to zoom 18)

My commit is on github, comments are welcome... before my first mod_tile
pull request

https://github.com/cquest/mod_tile/commit/652ec90c7d1293a4b049ee0b58be53c01a602e75

-- 
Christian Quest - OpenStreetMap France
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20140720/366ea2d5/attachment.html>


More information about the dev mailing list