-
Notifications
You must be signed in to change notification settings - Fork 107
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
Slow import time #552
Comments
Related to #512 since importing these extra dependencies seems to be contributing around 25% of the time. |
Thanks for the bug report, I reproduced it with
There is not much we can do about the pydantic models. We can provide solutions to users:
Since there is not much we can do except fixing #512 and then much later (1+ year) provide a Mojo package, I would advise to close this issue. |
I think we should keep this open as import time can be important and I'd say it's currently too high, this is still currently a major pain point for me. Following #512 (comment) would you be happy with removing the dependencies that account for ~20% of the time or prefer to wait a bit longer? It might also be worth seeing if we can speed up the pydantic stuff, e.g. see https://docs.pydantic.dev/latest/concepts/performance/. |
I think we can start removing the typer/tqdm dependency. Installing the docker client is documented well enough on the internet that we don't have to do it for our users. |
Removes dependency on typer/tqdm/requests by dropping support for downloading the docker client. Initially agreed at #512 (comment), this has been deprecated since #577 (v0.71.0 released in April 2024), and agreed we can now remove at #552 (comment). If accepted, this supercedes #513 as a resolution to #512. We will also be able to close #575.
The import time has improved slightly (in my testing around 500ms, down from 600ms) since removing the typer/tqdm dependency, and the config change at #643 roughly halves this. However, a 200ms import time is still more than I'd hope for, e.g. for implementing a CLI tool that supports running a command in a running container, where the Podman command itself takes ~100ms. Perhaps we're just dependent on some more Pydantic performance improvements here... |
The
python_on_whales
package is a bit slow to import (noticeable for scripts when you just want to show help output):The text was updated successfully, but these errors were encountered: