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

ASSUME startup time high due to packages like pypsa and torch #318

Closed
maurerle opened this issue Mar 12, 2024 · 2 comments
Closed

ASSUME startup time high due to packages like pypsa and torch #318

maurerle opened this issue Mar 12, 2024 · 2 comments

Comments

@maurerle
Copy link
Member

maurerle commented Mar 12, 2024

I found that the startup time of assume can be relatively high with multiple seconds.
This is due to the time it takes to import packages in python.

pypsa		0.938s
torch		1.4s
pandas		0.262s
pyomo		0.214s
sqlalchemy	0.26s
numpy		0.1s
yaml		0.002s

resulting in 3.3s vs 0.6s of init duration (if pypsa, torch and pyomo is not installed).

There is nothing we can do about it and its not a major issue.
Just keep in mind, that it is faster if those two packages are not installed if you do not need them
I am just looking into performance generally and wanted to document this here.

@maurerle
Copy link
Member Author

maurerle commented Mar 12, 2024

with only needed packages:
image

with all packages installed:
image

running
python3 -X importtime cli.py 2> out.profile
and visualizing it with
tuna out.profile

@maurerle
Copy link
Member Author

I don't think that there is anything we can do about this.
We should focus on the improvements which can be made in #321

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