Skip to content
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 the import time #732

Open
shimwell opened this issue Feb 14, 2021 · 0 comments
Open

speeding up the import time #732

shimwell opened this issue Feb 14, 2021 · 0 comments

Comments

@shimwell
Copy link
Collaborator

shimwell commented Feb 14, 2021

importing paramak on the laptop over 1.6 seconds and I was wondering if this can be decreased.

python 3.7 upwards has a inbuild profiler

python3.7 -X importtime -c "import paramak" 2> import.log

and packages like tuna can display the times

pip install tuna
tuna import.log

Screenshot from 2021-02-14 21-28-01

I am wondering if a few import statements can be refactored

e.g

instead of import numpy we could only import the parts used from numpy import linespace

this might save a little time as suggested here https://stackoverflow.com/questions/38768129/how-to-reduce-the-time-of-python-import-modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant