pyproj: Proj() slowing down with PROJ 7.2.1+
The Proj() function in pyproj 3.0.1 appears to be slower that its counterpart in version 3.0.0.
The following test script can be used to demonstrate this issue:
from pyproj import Proj
import time
test_crs = {"proj": "omerc",
"lat_0": 45.0,
"lonc": 45.0,
"k": 1,
"alpha": -45.0,
"gamma": 0.0,
"units": "m",
"ellps": "WGS84",
"no_defs": True,
}
n_runs = 100
t0 = time.time()
for i in range(n_runs):
Proj(test_crs, preserve_units=True)
t_exec = time.time()-t0
print(f"Execution time: {t_exec} secs")
The following console outputs were noted when running with different versions of the Pyproj library:
-
When using Version 3.0.1, the output was:
Execution time: 3.026028871536255 secs -
When using version 3.0.0, the output was:
Execution time: 0.12688589096069336 secs
In this case, the Proj() function in 3.0.0 Appears to be ~20x faster than its counterpart in 3.0.1.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (11 by maintainers)
Need PROJ 8.1+