Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Avoid calling msProjectionsDiffer over and over again #5259
As reported on the mailing list in http://osgeo-org.1560.x6.nabble.com/Performance-issue-with-MS-7-x-td5253419.html , there is a performance issue that became visible once the code to
here are some metrics about my own tests, always using the same query:
Time needed before your commit (
Time needed after:
~38.5 billions CPU cycles needed, most of the time wasted in projections init (pj_init_ctx)
Callgrind after the commit:
~11.8 billions CPU cycles needed.
The previous version used by our customer was still faster than the 2 studied here (only 6.5 billions CPU cycles were needed for the previous query in Mapserver 6.4), but the current optimization is clearly better than nothing.
Using a compiled version of MS on branch-6.4, I actually have the same result as the one after your commit:
But below is the screenshot I obtained last week when the same query was performed on the official debian jessie package ; there might be some optimizations done at compilation time by the debian packaging team.
For the record, here is the full debian package version: