Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lazy import asyncio.sleep as it's expensive (#450)
On my system, importing tenacity (_without tornado_) takes 35ms, and asyncio is singlehandedly responsible for 15ms. Some users do not ever use AsyncRetrying (or asyncio in their project generally) and it would be a shame for them to incur a unnecessary import penalty. Full disclaimer: I pursued this change primarily to reduce pip's startup time where asyncio was a nontrivial portion of the import timeline.
- Loading branch information