aiidateam / aiida-pseudo

MIT License
5 stars 8 forks source link

CLI: Reduce the load time significantly #142

Closed sphuber closed 1 year ago

sphuber commented 1 year ago

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.