-
Notifications
You must be signed in to change notification settings - Fork 367
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
PyProj transformers often reinstantiated #1915
Comments
Yes, see also #1895. |
@Bob131, a PR with that proposed fix would be most welcome! We added in the cache inside the Cython routine to catch the segment transforms, but it looks like I forgot about the Transformer creation in the transform_points area of the code. See here for the other cache that we currently have: Lines 579 to 580 in 72216fd
|
So I did prepare a PR, but the CLA put me off somewhat; I might leave it to someone else (sorry!). I will mention a couple of things, though:
|
:( That is a bummer you're put off by the CLA. I don't think you're alone there either. I took your idea above and created #1918, can you check to make sure that works for your case? |
Note, it's more of a DCO than the more onerous CLAs. |
Profiling an animation I've been fiddling with, I noticed about 10 seconds (~15% of the total run time) was spent in
_safe_pj_transform
:Constantly creating new
Transformer
instances seems to be quite expensive. A quick hack improves things drastically:Is there any chance Cartopy could take care of caching transformers in a similar manner?
The text was updated successfully, but these errors were encountered: