requests: Importing requests is fairly slow
We are using requests in our projects, and it is working great. Unfortunately, for our CLI tools, using requests is an issue because it is slow to import. E.g. on my 2014 macbook:
python -c "import requests"
Takes close to 90 ms.
Is optimizing import time worth of consideration for the project ?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 44 (26 by maintainers)
timeitis not informative for imports, you have to create a new process every time because of python import caching.The main cost is importing urllib3, so I suspect that should be addressed there.