Skip to content

Explore moving the connect ceil_timeout in the client inside the Connector connect  #9598

@bdraco

Description

@bdraco

async with ceil_timeout(

If the connection is reused, we create a TimerHandler and than cancel is right away.... in testing this seems to be the case 80%+ of the time so this seem ripe to optimize away. Since we pass on the timeout object to connect anyways we could move the timeout into connect so it only does the timeout if its actually going to wait. Since we expect connection reuse to be common with HTTP/1.1+ this takes up a significant amount of the request time.

There is a small risk someone has subclassed and replaced the connect implementation with a custom connector, however it connect is quite complex so it seems unlikely someone would reimplement it. Either way it would need a breaking change note in the changelog.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions