Hello, fellow mapnik users and/or developers.

Recently I've stumbled upon strange performance issues when using
Python bindings. After investigating a little I've came to a
conclusion that rendering map from Python bindings is (at least) twice
as slow as using C++ to do the same job. To check my assumptions, I've
created simple test, which renders 250 images of size 768x768.
Coordinates are being shifted by 0.01 degree for each image, so I'm
going from somewhere near north France shore to somewhere near
Cambridge. Aaanyway, just look in the source code, the idea is pretty
simple -- http://bitbucket.org/mishok13/mapnik-perf-testing/src/
C++ code was compiled using following command:
g++ -Wall -O2 -I/usr/include/freetype2 -I/usr/include/mapnik -lagg_pic
-lmapnik render.cpp -o render 2>&1

So, the timings for these:
C++ render:
$ time ./render

real    0m19.766s
user    0m5.196s
sys     0m0.636s

Python render:
$ time ./render.py

real    0m52.883s
user    0m22.445s
sys     0m0.844s

As you can see, results are not really satisfying. I'm still resisting
to just simply use C++, as writing non-library C++ code hurts my
feelings badly, so if anyone has any clues -- don't hesitate to share
them with me. :)
You could also run the tests on your computer and share the results.

Some information about PC I've used for these tests:
Latest Mapnik trunk checkout (revision 1288)
Boost version 1.37
PostGIS version 1.3.3
Python 2.6
Latest UK extract from CloudMade (obviously :) )
All of this running on Ubuntu 9.04.

-- 
Wbr, Andrii V. Mishkovskyi.

I have the last page code of rocket launch program in NASA written in Lisp:
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to