Faster, safer reprojection #605

Closed
artemp opened this Issue Oct 11, 2011 · 3 comments

Comments

Projects
None yet
1 participant
Owner

artemp commented Oct 11, 2011

Something is not right in proj.4 land. Mapnik kept pace with MapServer in the recent WMS benchmarks for rendering in non re-projecting scenarios, but did not scale when on the fly reprojection was tested.

A bunch of speedups were found previously by removing some uneeded locking, but likely there is more that needs to be done.

See: r2063 and r2181 (backported to 0.7.2 - #575)

Background on original proj4 issues: http://www.mail-archive.com/mapnik-devel@lists.berlios.de/msg00014.html

Owner

artemp commented Oct 11, 2011

[tomh] Version 4.8.0 of PROJ.4 is supposed to be threadsafe so long as you use the new proj_ctx_alloc routine to create a context and then pass that when creating the projection.

So r2226 changes mapnik to do exactly that when building against an appropriate version. We are then able to drop all the locking around projection calls.

Owner

artemp commented Oct 11, 2011

[springmeyer] did a quick test of this code at the sprint day3. I downloaded proj4 trunk, then manually incremented the PJ_VERSION to be 4.8.0, and recompiled mapnik. I saw no problems (an no apparent change in performance) under a non-reprojection scenario. I will next find time to run the reprojection scenario and let you know how things go.

on another note, just learned about http://valgrind.org/docs/manual/hg-manual.html, might be interesting to run proj.4 through it.

Owner

artemp commented Oct 11, 2011

[springmeyer] okay, yep, you nailed it. the reprojected scenario this is a huge win: http://mapnik.org/news/2010/sep/29/mcs01_roundup1/

@artemp artemp closed this Oct 11, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment