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

CLI: Reduce the load time significantly #142

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Nov 8, 2022

Fixes #141

Some of the commands imported a number of resources at the top of the modules that have large loading times on first import. This was causing the load time of the CLI to be ~1.5 seconds, even when just rendering the help message.

By moving the slow packages inside the commands themselves, the load time is reduced to a mere ~0.2 seconds. This makes the CLI much more snappy to use, especially when using tab-completion.

@sphuber sphuber force-pushed the fix/141/cli-load-speed branch from 3a7a4a7 to 2166edc Compare November 8, 2022 10:20
Some of the commands imported a number of resources at the top of the
modules that have large loading times on first import. This was causing
the load time of the CLI to be ~1.5 seconds, even when just rendering
the help message.

By moving the slow packages inside the commands themselves, the load
time is reduced to a mere ~0.2 seconds. This makes the CLI much more
snappy to use, especially when using tab-completion.
@sphuber sphuber force-pushed the fix/141/cli-load-speed branch from 2166edc to 9749f65 Compare November 8, 2022 10:22
@sphuber sphuber merged commit b6298be into master Nov 8, 2022
@sphuber sphuber deleted the fix/141/cli-load-speed branch November 8, 2022 10:29
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

Successfully merging this pull request may close these issues.

Improve the load time of the aiida-pseudo CLI
1 participant