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

Improve the import time. #775

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Improve the import time. #775

merged 1 commit into from
Feb 8, 2022

Conversation

manthey
Copy link
Member

@manthey manthey commented Feb 8, 2022

Some libraries: palettable and pylibmc account for a substantial import time. Loaded them as needed rather than on first import.

Some libraries: palettable and pylibmc account for a substantial import
time.  Loaded them as needed rather than on first import.
@manthey manthey merged commit ffe5257 into master Feb 8, 2022
@manthey manthey deleted the improve-import-time branch February 8, 2022 18:57
@manthey
Copy link
Member Author

manthey commented Feb 8, 2022

Curiously, after this change, the slowest import in the package is pkg_resources, whcih we use to determine version. We could switch to importlib for this purpose and shave off another 30-40 ms on initial import. When all the sources are loaded, the slow points are the nd2 and bioformat sources. Delaying imports on those is probably worth the speed improvement, though it would allow an installation without those packages to imply that those sources are available.

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.

1 participant