Closed
Description
I've experienced a multiple second delay when importing iocage on a large system. After figuring out the problem exists when loading modules, I've tried to debug and found a few issues in other places reporting similar occasions. Please excuse my debug print outputs here: https://asciinema.org/a/aISpNg4EIb31BS78uMXFBsxFM
Packages that were found to be slow:
- uuid
- requests
(After resting a self-written implementation of uuid, the next candidate requests
shows up).
See also:
- Importing requests is fairly slow psf/requests#3213
- lazily load uuid lib only where needed urllib3/urllib3#1270 (a little step towards better performance)
- https://bugs.python.org/issue11063
- https://bugs.python.org/issue5885