-
Notifications
You must be signed in to change notification settings - Fork 113
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
Using pkg_resources makes package load really slow #59
Comments
Hey @chrisjsewell, thanks for this! I mixed up the old and new methods :( Can you check the latest master and see that it works properly? |
Thanks for the quick reply, I haven't check the timing yet, but I would note that using |
Oof, no, I didn't notice the version... Do I need to use the backport then? |
Yep use the backport 👍 and also you can just do |
also, the error to catch is |
Hm, right. Given the frequency with which this library changes, I'm just going to type the version in by hand :P |
Haha yep that's good by me! |
But I want it in the |
Heya, this change really hurts package loading times 😬
shortuuid/shortuuid/__init__.py
Line 13 in bcd01ce
For example, with our CLI this change has meant an increase in load time from ~0.3 seconds to ~0.8 seconds!
pkg_resources
is essentially deprecated, in part, for this very reason; replaced by https://docs.python.org/3/library/importlib.metadata.html and the https://github.com/python/importlib_metadata backportThe text was updated successfully, but these errors were encountered: