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

PERF: to_epsg causes data loading to be slow for CRS without EPSG code #1321

Closed
snowman2 opened this issue Oct 10, 2022 · 0 comments · Fixed by #1322
Closed

PERF: to_epsg causes data loading to be slow for CRS without EPSG code #1321

snowman2 opened this issue Oct 10, 2022 · 0 comments · Fixed by #1322

Comments

@snowman2
Copy link
Contributor

This issue is appearing again: #1222

After profiling the load call:
image

It appears that the rasterio CRS object is being converted to a datacube CRS object about 3750 times in a single load call. The main source of the load time is the call to to_epsg.

I understand that there is a CRS cache to make things faster. I have been thinking about this and I and starting to think that the EPSG form will not be any better than a WKT when you are loading data from the same data source as is done in datacube.

I propose:

  1. Remove to_epsg entirely from the cache form and rely only on to_wkt
  2. Lazily load to_epsg in the CRS class.

Thoughts?

cc: @alfredoahds

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 a pull request may close this issue.

1 participant