On Jul 7, 2010, at 5:16 PM, joel collins wrote:

> New mapnik user here, i've made a lot of progress in the last few
> weeks but its been slow going.  I am trying to create a tile overlay
> on google maps of some census bureau tiger data (congressional
> district maps in particular) and i have downloaded the associated
> shapefiles (containing polygons only, no markers or other data types).
> 
> For a web server I am currently just using Tilelight (mapnik-utils)
> for development, and although i'm planning on using a different
> configuration in production, i'm seeing very poor performance during
> tile generation.

That's because the 'liteserv.py' script is only for development, and deployment 
targets multicore architectures only (mod_wsgi with N processes = number of 
cores).

Although I too find that python's wsgiref server implementation (that 
liteserv.py) uses is very slow. You can get about double the speed with other 
development servers that implement the WSGI standard, one being werkzeug. In 
fact, just the other day I added support for werkzeug:

http://bitbucket.org/springmeyer/tilelite/changeset/e2335783f42c

But, again the faster deployment for TileLite is with mod_wsgi inside Apache.

And faster again will be a multithreaded server like mod_tile.

>  On my google maps, for example, when i scroll to a
> new area or change zoom levels it can often take 15 seconds for the
> new tiles to appear (this is especially slow because there are about a
> dozen simultaneous tile requests that queue up).

That's because you are running a single-threaded, single-process development 
server that is only for development.

>  I realize that on a
> multi-core production machine this wont be so bad but it still seems
> very slow.
> 
> When I render a single tile, it still takes between 0.5-3 seconds.  I
> have tried loading the shapes into postgres but that actually resulted
> in worse performance (5 seconds), although I may have configured
> something wrong.  Some rudimentary math tells me that I wont be able
> to pre-render all tiles (we would like to be able to show street-level
> zooming in google maps, around 16 or 17), so we will need to have the
> ability to render tiles that haven't been pre-rendered fast enough for
> real time browsing.  Also, using something like TileCache will help of
> course but at the end of the day new tiles still need to be rendered.
> 
> My questions are:
> What kind of response times should I expect from mapnik for creating
> tiles from shapefiles?
> 
> What can be done to speed up the rendering?  Should I be downsampling
> the number of data points in the shape files?  We like the high level
> of accuracy that we see in the tiger files but maybe thats what is
> slowing this down?
> 
> Is leaving the data in shapefiles the appropriate approach?  (I was
> planning on using postgis so i could do other queries like see which
> polygons touch, find what polygons are near a lat/long, etc)
> 
> Thanks!
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users

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

Reply via email to