I have created a python module that I import into a jupyter notebook for general usage. I have a number of jit functions in the module, circa 20. The module can take up to a minute to import, but if I comment out the @njit decorators, the module will import instantaneously. I was wondering if any python wizzes know what's going on here under the hood at import. Is there any way I can bring down this agonizingly long import time?
So I figured out that removing the signatures of my functions sped up the import time significantly. However, the first executions of the functions were significantly slower. If the functions have signatures, then the functions are compiled at import, this is due to the input and return types being known. If there are no signatures, then the functions are compiled at execution, as it is only at this point where the compiler knows the input and return types.
Why does my module with jit functions take so long to import?