Skip to content

PERF: asv for import time #26663

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

Closed
2 tasks
jbrockmendel opened this issue Jun 5, 2019 · 10 comments · Fixed by #28239
Closed
2 tasks

PERF: asv for import time #26663

jbrockmendel opened this issue Jun 5, 2019 · 10 comments · Fixed by #28239
Labels
Benchmark Performance (ASV) benchmarks
Milestone

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Jun 5, 2019

Not entirely sure how to do it with asv, but at the command line its just python3 -X importtime -c "import pandas"

  • import time with python3 -X importtime -c "import pandas"
  • import size with something like import pandas, psutil; psutil.Process().memory_info()
@WillAyd
Copy link
Member

WillAyd commented Jun 5, 2019

Yea I think this would be a good idea. Maybe create a subprocess in setup and load pandas in the subprocess call

@WillAyd WillAyd added the Benchmark Performance (ASV) benchmarks label Jun 5, 2019
@WillAyd WillAyd added this to the Contributions Welcome milestone Jun 5, 2019
@jbrockmendel
Copy link
Member Author

@alimcmaster1
Copy link
Member

Here is something similar numpy did: https://github.com/numpy/numpy/pull/8159/files - do we just want to benchmark import pandas or test some sub packages too?

@WillAyd
Copy link
Member

WillAyd commented Jun 8, 2019

Makes sense to me. I think we'd take a PR for something like that if you'd like to post one

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jun 9, 2019 via email

@jbrockmendel
Copy link
Member Author

No opinion on numexpr, but for matplotlib I'd rather it be installed. I'm pretty sure some effort has been put in to making matplotlib imports lazy. This would help ensure that we don't accidentally undo that (this was motivated by exactly this happening in statsmodels)

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jun 9, 2019 via email

@TomAugspurger
Copy link
Contributor

if [[ -z "$CHECK" || "$CHECK" == "code" ]]; then

@jbrockmendel
Copy link
Member Author

Thanks for pointing that out. Is there a particular reason that was used instead of the approach here statsmodels/statsmodels#5831 ?

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jun 9, 2019 via email

@jreback jreback modified the milestones: Contributions Welcome, 1.0 Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benchmark Performance (ASV) benchmarks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants