-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
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
- See note / suggestion about use of context managers: linkcheck builder: streamed HTTP requests do not close their local socket #11317 (comment)