- changed status to open
import pywapor takes a very long time
Hi,
import pywapor
The import time for the pywapor module takes too long: 1-1.5 minutes.
I quickly looked at the nested imports: it seems there are no imports with lengthy operations.
Perhaps this is all due to poorly cyclical imports?
What could be the problem?
python 3.10.*
Comments (5)
-
-
- marked as minor
- marked as enhancement
-
reporter @bert.coever
I think the problem is using numba for optimization. Profiling showed that 95% of the time is spent calling call and essentially compiling the entire project code.
If you comment out all the decorators from numba like @jit and so on, then import will take ~1sec
-
Hi Alexander, thanks for letting me know. I guess we could try to import those decorated functions when they are actually needed, instead of importing them at the start.
-
- changed status to resolved
pywapor.enhancers.smooth.core
is now imported when its functions are actually required, resulting in a much fasterimport pywapor
.https://bitbucket.org/cioapps/pywapor/commits/2f2d251f2da86276eec604922be9755430ed83bb
- Log in to comment
Not sure, if you have any suggestions on how to improve import time please let me know.