-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
PERF: Slow import-time expression slowing down test collection #43888
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
Comments
Thanks for reporting this @bluetech! A pr to fix this would be very welcome. Generally, we've got a few issues about slow testing - any tips from |
How do you identify slow-to-collect tests? |
In this case I saw it in pyinstrument output. Look for pyinstrument pytest pandas collect only
|
I have checked that this issue has not already been reported.
I have confirmed this issue exists on the latest version of pandas.
I have confirmed this issue exists on the master branch of pandas.
Reproducible Example
I'm a pytest dev that's been looking to speed up collection time, using pandas as a benchmark. I thought you'd be interested to know that there is a case which is slow (~1s) just because it does something heavy at the module scope:
pandas/pandas/tests/test_algos.py
Lines 1800 to 1805 in 6599834
These arrays are heavy to create, better to make it lazy by wrapping in a lambda or just split to two separate tests.
There's also something slow in the pandas/tests/reshape/merge/test_merge.py module but I'm not sure what.
Installed Versions
Prior Performance
No response
The text was updated successfully, but these errors were encountered: