On Wed, 2009-01-07 at 20:58 +0100, Ekkehart wrote:
> Hi!
> 
> 
> I have done some profiling. Rendering a single tile takes an average of 
> 1979ms. Of this time, 1814ms are spent on mapnik rendering, the 
> remaining 165ms are file I/O and image conversion/blending. So it is the 
> rendering that needs optimization in some ways.
> 
> Are there any tricks for getting it faster?

Render less data by removing things from the map style.
Consider simplifying some of the geometries for lower zooms.

Render on-demand using something like the OpenStreetMap mod_tile code or
the MetaCarta TileCache. To me, the generate_tiles.py script is more of
a demo of how simple it is to render tiles. It is not an optimised
solution for rendering millions of tiles.

>  Constructs to avoid in the 
> osm.xml?

Avoid fetching lots of data in the DataSource only to filter it away in
the style. IF you can, move some of the filters to the SQL.

> Is it helpful to create indices on the DB? Currently there are none.

The most import index is the one on the spatial column and that is
already there. Try creating some more indexes and test whether
Postgresql will use them (e.g. capture some of the queries and ask
PostgreSQL to 'explain select ...').

> Other than that, Metatiling looks promising, I think I'll have to try to 
> get the script to somehow do multiple tiles in one go.

Metatiling is definitely a good performance win but I'm still not sure
you will be happy with the performance. 

        Jon

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to