mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 02:08:38 +09:00
Issue #2430 - No longer force tcp send buffer size on HTTP/2 uploads > 128KB
With connection-level and stream-level flow control, it is not needed. On fast connections with large-ish BWP, this can improve upload speed by > 5x
This commit is contained in:
parent
3e65ae353a
commit
c451531d54
3 changed files with 9 additions and 4 deletions
|
|
@ -1602,7 +1602,7 @@ pref("network.http.spdy.coalesce-hostnames", true);
|
|||
pref("network.http.spdy.persistent-settings", false);
|
||||
pref("network.http.spdy.ping-threshold", 58);
|
||||
pref("network.http.spdy.ping-timeout", 8);
|
||||
pref("network.http.spdy.send-buffer-size", 131072);
|
||||
pref("network.http.spdy.send-buffer-size", 0); // 0 - Auto (managed by OS)
|
||||
pref("network.http.spdy.allow-push", true);
|
||||
pref("network.http.spdy.push-allowance", 131072); // 128KB
|
||||
pref("network.http.spdy.pull-allowance", 12582912); // 12MB
|
||||
|
|
|
|||
|
|
@ -788,8 +788,9 @@ Http2Stream::UpdateTransportSendEvents(uint32_t count)
|
|||
// the session and cap the send buffers by default at 128KB.
|
||||
// (10Mbit/sec @ 100ms)
|
||||
//
|
||||
// This feature is disabled by default.
|
||||
uint32_t bufferSize = gHttpHandler->SpdySendBufferSize();
|
||||
if ((mTotalSent > bufferSize) && !mSetTCPSocketBuffer) {
|
||||
if ((bufferSize > 0) && (mTotalSent > bufferSize) && !mSetTCPSocketBuffer) {
|
||||
mSetTCPSocketBuffer = 1;
|
||||
mSocketTransport->SetSendBufferSize(bufferSize);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1437,8 +1437,12 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
|
|||
// closing the session.
|
||||
if (PREF_CHANGED(HTTP_PREF("spdy.send-buffer-size"))) {
|
||||
rv = prefs->GetIntPref(HTTP_PREF("spdy.send-buffer-size"), &val);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
mSpdySendBufferSize = (uint32_t) clamped(val, 1500, 0x7fffffff);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (val != 0)
|
||||
mSpdySendBufferSize = (uint32_t) clamped(val, 1500, 0x7fffffff);
|
||||
else
|
||||
mSpdySendBufferSize = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// The maximum amount of time to wait for socket transport to be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue