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

Lazy import asyncio.sleep as it's expensive #450

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Commits on Mar 13, 2024

  1. Lazy import asyncio.sleep as it's expensive

    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.
    ichard26 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    e904fa3 View commit details
    Browse the repository at this point in the history