Skip to content

Use global context for pyproj when single-threaded #487

@rmeyers4

Description

@rmeyers4

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions