audiomate icon indicating copy to clipboard operation
audiomate copied to clipboard

Import is slow

Open ynop opened this issue 7 years ago • 2 comments

import audiomate

The import takes some time. Check what causes this and probably only import some dependencies when needed.

ynop avatar Oct 17 '18 09:10 ynop

Some numbers would be great so that we have something to compare to.

aahlenst avatar Oct 17 '18 11:10 aahlenst

>>> def x():
...     import audiomate
...
>>> timeit.timeit(x)
7.001230426132679
>>>

In a fresh environment, it always takes around 6-8 seconds. Not that severe, but sucks when you startup interactive python to check something with the library.

In comparison pytorch takes less than 2.

>>> def y():
...     import torch
...
>>> timeit.timeit(y)
1.4896932486444712

ynop avatar Oct 18 '18 19:10 ynop