Skip to content

Commit

Permalink
[SOUP] Increase maximum connection limit from 17 to 256
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=260725

Reviewed by Carlos Garcia Campos.

A long time ago, web browsers limited themselves to fairly small maximum
connection limits. Nowadays, Chrome uses 256 and Firefox uses 900, but
we still have a 17 connection limit established in 170917@main. I picked
17 for no other reason than that was what other browsers were doing at
the time. That reasoning is as good now as ever, so time to increase.

Note this has little effect on HTTP/2 and newer, as there we generally
use only one or two connections total per origin.

* Source/WebCore/platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::SoupNetworkSession):

Canonical link: https://commits.webkit.org/267455@main
  • Loading branch information
mcatanzaro committed Aug 30, 2023
1 parent 82d7f77 commit 9dce195
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Source/WebCore/platform/network/soup/SoupNetworkSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,8 @@ class HostTLSCertificateSet {
SoupNetworkSession::SoupNetworkSession(PAL::SessionID sessionID)
: m_sessionID(sessionID)
{
// Values taken from http://www.browserscope.org/ following
// the rule "Do What Every Other Modern Browser Is Doing". They seem
// to significantly improve page loading time compared to soup's
// default values.
static const int maxConnections = 17;
// These values match Chrome 81. https://stackoverflow.com/a/30064610
static const int maxConnections = 256;
static const int maxConnectionsPerHost = 6;

m_soupSession = adoptGRef(soup_session_new_with_options(
Expand Down

0 comments on commit 9dce195

Please sign in to comment.