mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
RequestServer: Wait until initial connection is open for multiplexing
By default, if multiple requests start to a newly seen origin, curl will not wait for a connection to open to figure out if the server supports multiplexing and will instead open a new connection for each request (including a new TLS session and such) This is particularly an issue for initial page load, where a complex website could, for example, request tens of items at once (e.g. a bunch of scripts). We can be kinder to servers that support multiplexing by telling curl to wait till an initial connection is established to determine if multiplexing is supported. On my machine and internet connection, this reduces the amount of connections to github.githubassets.com on initial load of https://github.com/LadybirdBrowser/ladybird from 12 to 2.
This commit is contained in:
parent
6ef96ba170
commit
05ee3f1876
Notes:
github-actions[bot]
2025-07-07 12:12:41 +00:00
Author: https://github.com/Lubrsi
Commit: 05ee3f1876
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5311
1 changed files with 1 additions and 0 deletions
|
@ -487,6 +487,7 @@ void ConnectionFromClient::start_request(i32 request_id, ByteString method, URL:
|
|||
set_option(CURLOPT_URL, url.to_string().to_byte_string().characters());
|
||||
set_option(CURLOPT_PORT, url.port_or_default());
|
||||
set_option(CURLOPT_CONNECTTIMEOUT, s_connect_timeout_seconds);
|
||||
set_option(CURLOPT_PIPEWAIT, 1L);
|
||||
|
||||
bool did_set_body = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue