You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It takes almost 4 seconds for muon to import, it would be nice if we could import muon < 1s like scanpy
Python 3.9.12 (main, Apr 5 2022, 06:56:58)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import timeit
>>> import_time = timeit.timeit("import muon", number=1)
>>> print("Time taken to import muon:", import_time, "seconds")
Time taken to import muon: 4.092318220064044 seconds
Describe the solution you'd like
I have not dug into the code too much, maybe delaying any costly setups/internal imports to later when needed so most users can avoid the initial delay.
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered:
I tried to see if I could fix this. I initially thought the top level jit compiles in preproc.py were the culprit but even after delaying them, import was still slow. It turns out the issue is related to specifying type hints, numba will always eagerly compile code in this case. The umap module apparently also does this so even if the type hints in preproc.py were removed it would still be slow to import umap and hence muon. Looks like no solution exists to force eagerness on numba's part yet, so not sure this can be resolved for now.
Relevant issue on numba : numba/numba#4956
Is your feature request related to a problem? Please describe.
It takes almost 4 seconds for muon to import, it would be nice if we could
import muon
< 1s like scanpyDescribe the solution you'd like
I have not dug into the code too much, maybe delaying any costly setups/internal imports to later when needed so most users can avoid the initial delay.
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: