Skip to content

Conversation

@gatli
Copy link
Contributor

@gatli gatli commented Oct 17, 2022

Managing imports to late import stuff that is not necessary for most users.

  • np, sklearn and shapely on the metrics side (which nobody but our internal services use)
  • tqdm notebook is now only loaded in notebooks.
  • Shell completion script is now generated once and sourced -> this speeds up shell init considerably and autocompletion

Timing:

pipx install tuna
poetry run python -X importtime cli/nu.py 2>tuna.log
tuna tuna.log

Before

image

After

image

@gatli gatli requested a review from jean-lucas October 17, 2022 20:26
@gatli gatli self-assigned this Oct 17, 2022
@gatli gatli force-pushed the gunnar/nucleus/speed-up-cli branch from 335483e to b4dada7 Compare October 19, 2022 09:22
Copy link
Contributor

@jean-lucas jean-lucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice improvements 😎

@gatli
Copy link
Contributor Author

gatli commented Oct 19, 2022

nice improvements 😎

❤️

@gatli gatli merged commit adda9a9 into master Oct 19, 2022
@gatli gatli deleted the gunnar/nucleus/speed-up-cli branch October 19, 2022 09:45
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.

3 participants