Skip to content

linkcheck builder: begin using requests.Session functionality during linkchecking #11324

@jayaddison

Description

@jayaddison

Is your feature request related to a problem? Please describe.
At the moment, the linkcheck builder performs individual request.get (or similar HTTP request method) operations during linkchecking, without any explicit connection or session pooling.

This may be inefficient, because it seems likely that for many use cases, linkchecking will make multiple requests to the same host (because documentation references are likely to have host-locality).

Describe the solution you'd like
Confirmation that connection pooling is not currently in use would be a good starting point; in other words: we should confirm that linkchecking of multiple URLs on a single host results in multiple TCP connections. Ideally this should be written as a test case.

If we can confirm that the problem exists, then we may be able to use some of the Session object functionality from the requests library that's already in use here to enable connection pooling.

Describe alternatives you've considered
None so far, although open to suggestions (and improvements on the definition of this feature request).

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions