[Thuban-list] arcview comparition and thuban.mo

Bernhard Herzog bh at intevation.de
Mon Oct 20 14:55:47 CEST 2003

Bernhard Herzog <bh at intevation.de> writes:

> While Python's speed is certainly an issue, I'm not sure how much impact
> that still has on the rendering especially in the case of rendering from
> shapefiles and without classifications.

I did some simple timings last week. The test map was just the
roads-line.shp and political.shp from the iceland data, no
classifications, just a 1 pixel line for both layers plus a fill for the
"political" layer.

Normal rendering (with the low-level C++ accelerator) takes about 0.041
seconds on my machine. If I replace the low-level redering function with
a no-op so that basically everything but the low-level renderer is
executed it only takes 0.0115 seconds. So the low-level renderer takes
about 70% of the rendering time.

Some things to keep in mind here:

 - low-level renderer means that it uses shapelib to read the geometry
   of a shape, applies some coordinate transformations and produces an
   array of wxPoints to pass to a wxDC. On my system with wxGTK that
   array is then converted to an array of gdkpoints (which again
   involves some coordinate transformation) and passed to
   gdk_draw_polygon which hands the array over to the appropriate xlib
   function (with only a cast since GdkPoint has the same structure as
   an XPoint). Xlib then serializes this and sends it to the X server on
   the same computer. 

   Some more timing tests where the actual calls to the wxDC methods
   DrawPolygon and DrawLines were commented out in wxproj.cpp indicate
   that the wxWindows/gtk/xlib part takes about 0.015 seconds.
 - The timings only take the client side into account. This can be
   misleading when timing rendering speed on X because it can happen
   that the client is already finished while the server still processes
   the requests sent by the client. I don't think this is much of a
   problem here, though, and in any case it wouldn't change anything
   regarding the impact of Python (if anything the non-python parts take

 - The timing results depend a lot on the whether there are layers with
   classifications, the data source (shapefile vs. postgis) and the type
   of shapes (currently there's no C++ low-level renderer for points for
   instance), among others. The percentage of time spent in the
   low-level renderer is largest for the case I looked at.


Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
Thuban                                  http://thuban.intevation.org/

More information about the Thuban-list mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)