diff options
| author | Michael Goulish <mgoulish@apache.org> | 2010-01-29 18:53:28 +0000 |
|---|---|---|
| committer | Michael Goulish <mgoulish@apache.org> | 2010-01-29 18:53:28 +0000 |
| commit | e0410a0172b428b6cfa5baaf9b95f9107a9f7571 (patch) | |
| tree | 94571264708e6ee839093b208094917e4ac7c937 /qpid/cpp | |
| parent | 59f13c72fb18b3488165a206492a1891a86a59eb (diff) | |
| download | qpid-python-e0410a0172b428b6cfa5baaf9b95f9107a9f7571.tar.gz | |
Change the heuristic used to alter the send estimate up and down.
Especially, change the starting estimate to be much higher than 1
message.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@904588 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp b/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp index cb75fe5561..f80eb9c434 100644 --- a/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp +++ b/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp @@ -36,7 +36,7 @@ using namespace std; NoOpConnectionOutputHandler OutputInterceptor::discardHandler; OutputInterceptor::OutputInterceptor(Connection& p, sys::ConnectionOutputHandler& h) - : parent(p), closing(false), next(&h), sendMax(1), sent(0), sentDoOutput(false) + : parent(p), closing(false), next(&h), sendMax(2048), sent(0), sentDoOutput(false) {} void OutputInterceptor::send(framing::AMQFrame& f) { @@ -80,7 +80,7 @@ void OutputInterceptor::deliverDoOutput(uint32_t limit) { if (buffered == 0 && sent == sendMax) // Could have sent more, increase the limit. newLimit = sendMax*2; else if (buffered > 0 && sent > 1) // Data left unsent, reduce the limit. - newLimit = sent-1; + newLimit = (sendMax + sent) / 2; } sent = 0; while (sent < limit && parent.getBrokerConnection().doOutput()) |
