summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httppolicy.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-08-16 18:07:49 -0400
committerMonty Brandenberg <monty@lindenlab.com>2013-08-16 18:07:49 -0400
commite764a2a565e18ce2157788f634e85bc3641976b3 (patch)
tree2c0b0b53a0fdb3b07f47eecbc1fefee39a06a913 /indra/llcorehttp/_httppolicy.cpp
parentf84a8104b80eacad78b30c09cb016774e5c459c5 (diff)
SH-4407 Tuning to get new code working as well.
Do some runtime code avoidance and skip unnecessary libcurl and syscall invocations.
Diffstat (limited to 'indra/llcorehttp/_httppolicy.cpp')
-rwxr-xr-xindra/llcorehttp/_httppolicy.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/llcorehttp/_httppolicy.cpp b/indra/llcorehttp/_httppolicy.cpp
index 808eebc6cc..c4758aee88 100755
--- a/indra/llcorehttp/_httppolicy.cpp
+++ b/indra/llcorehttp/_httppolicy.cpp
@@ -212,6 +212,14 @@ HttpService::ELoopSpeed HttpPolicy::processReadyQueue()
for (int policy_class(0); policy_class < mClasses.size(); ++policy_class)
{
ClassState & state(*mClasses[policy_class]);
+ HttpRetryQueue & retryq(state.mRetryQueue);
+ HttpReadyQueue & readyq(state.mReadyQueue);
+
+ if (retryq.empty() && readyq.empty())
+ {
+ continue;
+ }
+
const bool throttle_enabled(state.mOptions.mThrottleRate > 0L);
const bool throttle_current(throttle_enabled && now < state.mThrottleEnd);
@@ -225,9 +233,6 @@ HttpService::ELoopSpeed HttpPolicy::processReadyQueue()
int active(transport.getActiveCountInClass(policy_class));
int needed(state.mOptions.mConnectionLimit - active); // Expect negatives here
- HttpRetryQueue & retryq(state.mRetryQueue);
- HttpReadyQueue & readyq(state.mReadyQueue);
-
if (needed > 0)
{
// First see if we have any retries...