diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 00:01:44 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 00:01:44 +0000 |
commit | 79d8422befd5875640639c3a7c3edd3e6de4b041 (patch) | |
tree | b616ef01211b2b7a94ff522cc80d36e53fbb3b54 /net/spdy/spdy_stream.h | |
parent | 05c52c546db0063c3deeea613b4b427de30c6d68 (diff) | |
download | chromium_src-79d8422befd5875640639c3a7c3edd3e6de4b041.zip chromium_src-79d8422befd5875640639c3a7c3edd3e6de4b041.tar.gz chromium_src-79d8422befd5875640639c3a7c3edd3e6de4b041.tar.bz2 |
Modify the SPDY stream to be buffered.
Discovered that passing small chunks of data to the renderer can cause the
renderer to get backlogged. With SPDY, data chunks are always framed into
smallish chunks (say ~4KB). So where HTTP would only send a couple of large
chunks to the renderer to satisfy a resource load, SPDY may send many, and
this was surprisingly slow.
BUG=none
TEST=SpdyNetworkTransactionTest.FullBuffer
Review URL: http://codereview.chromium.org/652209
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40073 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_stream.h')
-rw-r--r-- | net/spdy/spdy_stream.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h index 1d750c3..5445a5c 100644 --- a/net/spdy/spdy_stream.h +++ b/net/spdy/spdy_stream.h @@ -150,6 +150,10 @@ class SpdyStream : public base::RefCounted<SpdyStream> { // Call the user callback. void DoCallback(int rv); + void ScheduleBufferedReadCallback(); + void DoBufferedReadCallback(); + bool ShouldWaitForMoreBufferedData() const; + // The implementations of each state of the state machine. int DoSendHeaders(); int DoSendHeadersComplete(int result); @@ -203,6 +207,12 @@ class SpdyStream : public base::RefCounted<SpdyStream> { int recv_bytes_; bool histograms_recorded_; + // Is there a scheduled read callback pending. + bool buffered_read_callback_pending_; + // Has more data been received from the network during the wait for the + // scheduled read callback. + bool more_read_data_pending_; + DISALLOW_COPY_AND_ASSIGN(SpdyStream); }; |