pyproj icon indicating copy to clipboard operation
pyproj copied to clipboard

PERF: Thread-local global contex

Open snowman2 opened this issue 3 years ago • 0 comments

From: https://github.com/shapely/shapely/issues/1523#issuecomment-1237347057

Sounds like a good idea to look into seeing if https://docs.python.org/3/c-api/init.html#thread-local-storage-support would allow always using a thead-local global context instead of enabling a single global version (https://pyproj4.github.io/pyproj/stable/api/global_context.html).

Also see:

  • https://peps.python.org/pep-0539/
  • https://github.com/cython/cython/blob/efdf996dced075682d86b7e53a12b56b5ebfea38/tests/run/tss.pyx

snowman2 avatar Sep 07 '22 01:09 snowman2