SH-4371 Reduce 22mS inter-conenction latency on HTTP operations.

Mon, 29 Jul 2013 16:09:22 -0400

author
Monty Brandenberg <monty@lindenlab.com>
date
Mon, 29 Jul 2013 16:09:22 -0400
changeset 40699
f0af522931fa
parent 40698
8daa5f3fcf2e
child 40700
3d802c6426bf

SH-4371 Reduce 22mS inter-conenction latency on HTTP operations.
Simple change dropped this value by 7-10mS or so. Any time we
complete an operation on a transport pass, arrange to skip the
run-loop sleep so that we fill a possible empty slot as quickly
as possible. With pipelining, this kind of thing should become
unnecessary but for now, we'll do this to increase throughput.

indra/llcorehttp/_httplibcurl.cpp file | annotate | diff | revisions
     1.1 --- a/indra/llcorehttp/_httplibcurl.cpp	Mon Jul 29 12:42:27 2013 -0400
     1.2 +++ b/indra/llcorehttp/_httplibcurl.cpp	Mon Jul 29 16:09:22 2013 -0400
     1.3 @@ -132,12 +132,10 @@
     1.4  				CURL * handle(msg->easy_handle);
     1.5  				CURLcode result(msg->data.result);
     1.6  
     1.7 -				if (completeRequest(mMultiHandles[policy_class], handle, result))
     1.8 -				{
     1.9 -					// Request is still active, don't get too sleepy
    1.10 -					ret = HttpService::NORMAL;
    1.11 -				}
    1.12 -				handle = NULL;			// No longer valid on return
    1.13 +				completeRequest(mMultiHandles[policy_class], handle, result);
    1.14 +				handle = NULL;					// No longer valid on return
    1.15 +				ret = HttpService::NORMAL;		// If anything completes, we may have a free slot.
    1.16 +												// Turning around quickly reduces connection gap by 7-10mS.
    1.17  			}
    1.18  			else if (CURLMSG_NONE == msg->msg)
    1.19  			{

mercurial