-
Notifications
You must be signed in to change notification settings - Fork 6
Use global context for pyproj when single-threaded #487
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
There is quite a bit of overhead involved when creating pyproj CRS objects, which podpac does in many places (validating coordinates, transforming coordinates, etc). If podpac is running single-threaded, creating CRS objects is much, much faster when global context is enabled.
Describe the solution you'd like
Check Podpac settings for MULTITHREADING. If false, enable pyproj global context as part of PODPAC initialization.
See https://pyproj4.github.io/pyproj/stable/api/global_context.html#pyproj.set_use_global_context.
Sample Code
if not podpac.settings['MULTITHREADING']:
pyproj.set_use_global_context(True)
Additional context
Add any other context or screenshots about the feature request here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request