Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createFromCRSCodesWithIntermediates(): improve perf when no match #2583

Merged

Conversation

rouault
Copy link
Member

@rouault rouault commented Mar 18, 2021

createFromCRSCodesWithIntermediates() runs a rather costly self-join.
Only run it if the source and target CRS are the source/target of a
coordinate operation. This helps for the performance of
proj_create_crs_to_crs() when run on projected CRS for example that are
extremely unlikely to be the source/target of an operation (except
currently the Finish ones). For the EPSG:26915 to EPSG:3857 case of
OSGeo/gdal#3470, this helps decreasing the
time of proj_create_crs_to_crs() from 18 ms to 10 ms.

createFromCRSCodesWithIntermediates() runs a rather costly self-join.
Only run it if the source and target CRS are the source/target of a
coordinate operation. This helps for the performance of
proj_create_crs_to_crs() when run on projected CRS for example that are
extremely unlikely to be the source/target of an operation (except
currently the Finish ones). For the EPSG:26915 to EPSG:3857 case of
OSGeo/gdal#3470, this helps decreasing the
time of proj_create_crs_to_crs() from 18 ms to 10 ms.
rouault added a commit to rouault/gdal that referenced this pull request Mar 18, 2021
Helps decreasing the gdalwarp time of OSGeo#3470 from 123 ms to 113 ms.

And with OSGeo/PROJ#2583, we go down to 105 ms.
Compared to the 80 ms of GDAL 2.4/PROJ 5.2, and the ~ 300ms of
GDAL 3.2/PROJ 8
@rouault rouault added this to the 8.0.1 milestone Mar 18, 2021
@rouault rouault merged commit d20145a into OSGeo:master Mar 18, 2021
@rouault
Copy link
Member Author

rouault commented Mar 18, 2021

Backported to 8.0 per 9393831

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant