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

Cache sub-commands and hints to avoid pkg_resources load #34

Open
mwatts15 opened this issue Sep 26, 2021 · 0 comments
Open

Cache sub-commands and hints to avoid pkg_resources load #34

mwatts15 opened this issue Sep 26, 2021 · 0 comments

Comments

@mwatts15
Copy link
Contributor

The pkg_resources module import load takes a long time (~100ms on my machine) in CLI startup. It would be preferable not to import pkg_resources for every cli execution to avoid the cost of importing pkg_resources. This also means not calling iter_entry_points for every cli execution, so we need to cache the results of iter_entry_points execution as well: either the entry point names or the results of loading the entry points. For the sake of speed, it's acceptable to require an extra step to update the cache for new installs after first running a newly-installed owm, however the first run of owm should not require any extra steps other than the normal install procedures to run successfully with all sub-commands and hits 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

No branches or pull requests

1 participant