-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speeding up looper CLI use #476
Comments
You can view the output with a cool tool called
I just did this over at seems like Here is the log output: looper.log if someone wanted to download it and run |
I cannot reproduce those slow import times. I get ~0.4-0.56 seconds during import. I tested a fresh venv as well. |
Begun some work towards replacing pandas with polars and doing performance testing. peppy_branch: https://github.com/pepkit/peppy/tree/dev_replace_pandas_with_polars importing Peppy, Pandas, Looper 50 times, we see a mean and std in miliseconds for import time of: Using Pandas
Replacing pandas with polars in Peppy:
Note, I did not test Looper with the polars replacement yet because I realized that Looper will pull in pandas from Peppy, Ubiquerg, and Pipestat so it was becoming difficult to pull out pandas completely. |
Attempted to shuffle imports and then measured import time: f91bdad However, the import time actually increased.
Based on last week's discussion, most gains may come from refactoring Peppy. Therefore, I will move this to a later milestone while we await the Peppy changes. |
I'm unsatisified with how long it takes the
looper
CLI to run. I guess it's because looper imports a bunch of heavy stuff, likepandas
,peppy
,sqlalchemy
(via pephubclient), etc.A lot of these aren't necessary.
I suggest we see if it's possible to import some of the heaviest things only as needed, instead of at the top of the file as is typically done.
You can profile import time like this:
python -X importtime -c 'import looper'
The text was updated successfully, but these errors were encountered: