Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Unified Diff: net/spdy/spdy_session.cc

Issue 1061853002: Emit session-level WINDOW_UPDATEs less frequently. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« net/spdy/spdy_session.h ('K') | « net/spdy/spdy_session.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index db791e466b125387d1b4eb028e13d0de20803628..92fc40f42bfa8cdf03198e9d80c0361600d93490 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -660,6 +660,7 @@ SpdySession::SpdySession(
: stream_initial_recv_window_size),
session_send_window_size_(0),
session_recv_window_size_(0),
+ session_max_recv_window_size_(0),
session_unacked_recv_window_bytes_(0),
net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_HTTP2_SESSION)),
verify_domain_authentication_(verify_domain_authentication),
@@ -738,6 +739,7 @@ void SpdySession::InitializeWithSocket(
flow_control_state_ = FLOW_CONTROL_STREAM_AND_SESSION;
session_send_window_size_ = GetInitialWindowSize(protocol_);
session_recv_window_size_ = GetInitialWindowSize(protocol_);
+ session_max_recv_window_size_ = GetInitialWindowSize(protocol_);
} else if (protocol_ >= kProtoSPDY3) {
flow_control_state_ = FLOW_CONTROL_STREAM;
} else {
@@ -2793,8 +2795,9 @@ void SpdySession::SendInitialData() {
// This condition implies that |kDefaultInitialRecvWindowSize| -
// |session_recv_window_size_| doesn't overflow.
DCHECK_GT(session_recv_window_size_, 0);
- IncreaseRecvWindowSize(
- kDefaultInitialRecvWindowSize - session_recv_window_size_);
+ session_max_recv_window_size_ = kDefaultInitialRecvWindowSize;
+ IncreaseRecvWindowSize(session_max_recv_window_size_ -
+ session_recv_window_size_);
}
if (protocol_ <= kProtoSPDY31) {
@@ -3190,8 +3193,7 @@ void SpdySession::IncreaseRecvWindowSize(int32 delta_window_size) {
delta_window_size, session_recv_window_size_));
session_unacked_recv_window_bytes_ += delta_window_size;
- if (session_unacked_recv_window_bytes_ >
- GetInitialWindowSize(protocol_) / 2) {
Ryan Hamilton 2015/04/06 16:27:05 I'm curious why this didn't work. It *looks* like
Bence 2015/04/07 12:32:16 Good question. So GetInitialWindowSize is 64 kB,
Ryan Hamilton 2015/04/07 14:56:39 Oh, that method was return the protocol default, n
+ if (session_unacked_recv_window_bytes_ > session_max_recv_window_size_ / 2) {
SendWindowUpdateFrame(kSessionFlowControlStreamId,
session_unacked_recv_window_bytes_,
HIGHEST);
« net/spdy/spdy_session.h ('K') | « net/spdy/spdy_session.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698