summaryrefslogtreecommitdiff
path: root/indra/newview/llappcorehttp.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2014-06-27 17:25:39 -0400
committerMonty Brandenberg <monty@lindenlab.com>2014-06-27 17:25:39 -0400
commit17da4cf57aadcf1987b48af298d8b2742089a35c (patch)
tree40622e7f01c331b83a4e820942217431ca032f46 /indra/newview/llappcorehttp.cpp
parentc49ac5ded1168baf3f52586b961f7ed35a8bb999 (diff)
Cleanup and tuning. Use a consistent index on some initialization
data so their isn't an opportunity for gaps over overruns (init_data). Start some preliminary tweaking of policy class numbers. It looks like I can easily drop the default connection count to '4' and still hit the throttles. Did some experiments running pipeline deeper which was mostly fine for textures but tended to slow meshes. Reason uncertain but a depth of '5' seems generally healthy for mesh. I had one run of 52.6S with a theoretical minimum of 51.2S. That's as good as I've ever seen.
Diffstat (limited to 'indra/newview/llappcorehttp.cpp')
-rwxr-xr-xindra/newview/llappcorehttp.cpp41
1 files changed, 23 insertions, 18 deletions
diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp
index deda0ccb41..d097f18d61 100755
--- a/indra/newview/llappcorehttp.cpp
+++ b/indra/newview/llappcorehttp.cpp
@@ -42,9 +42,9 @@
const F64 LLAppCoreHttp::MAX_THREAD_WAIT_TIME(10.0);
const long LLAppCoreHttp::PIPELINING_DEPTH(5L);
+// Default and dynamic values for classes
static const struct
{
- LLAppCoreHttp::EAppPolicy mPolicy;
U32 mDefault;
U32 mMin;
U32 mMax;
@@ -52,40 +52,40 @@ static const struct
bool mPipelined;
std::string mKey;
const char * mUsage;
-} init_data[] = // Default and dynamic values for classes
+} init_data[LLAppCoreHttp::AP_COUNT] =
{
- {
- LLAppCoreHttp::AP_DEFAULT, 8, 8, 8, 0, false,
+ { // AP_DEFAULT
+ 8, 8, 8, 0, false,
"",
"other"
},
- {
- LLAppCoreHttp::AP_TEXTURE, 8, 1, 12, 0, true,
+ { // AP_TEXTURE
+ 4, 1, 12, 0, true,
"TextureFetchConcurrency",
"texture fetch"
},
- {
- LLAppCoreHttp::AP_MESH1, 32, 1, 128, 100, false,
+ { // AP_MESH1
+ 32, 1, 128, 100, false,
"MeshMaxConcurrentRequests",
"mesh fetch"
},
- {
- LLAppCoreHttp::AP_MESH2, 8, 1, 32, 100, true,
+ { // AP_MESH2
+ 4, 1, 32, 100, true,
"Mesh2MaxConcurrentRequests",
"mesh2 fetch"
},
- {
- LLAppCoreHttp::AP_LARGE_MESH, 2, 1, 8, 0, false,
+ { // AP_LARGE_MESH
+ 2, 1, 8, 0, false,
"",
"large mesh fetch"
},
- {
- LLAppCoreHttp::AP_UPLOADS, 2, 1, 8, 0, false,
+ { // AP_UPLOADS
+ 2, 1, 8, 0, false,
"",
"asset upload"
},
- {
- LLAppCoreHttp::AP_LONG_POLL, 32, 32, 32, 0, false,
+ { // AP_LONG_POLL
+ 32, 32, 32, 0, false,
"",
"long poll"
}
@@ -173,9 +173,10 @@ void LLAppCoreHttp::init()
mHttpClasses[AP_DEFAULT].mPolicy = LLCore::HttpRequest::DEFAULT_POLICY_ID;
// Setup additional policies based on table and some special rules
+ llassert(LL_ARRAY_SIZE(init_data) == AP_COUNT);
for (int i(0); i < LL_ARRAY_SIZE(init_data); ++i)
{
- const EAppPolicy app_policy(init_data[i].mPolicy);
+ const EAppPolicy app_policy(static_cast<EAppPolicy>(i));
if (AP_DEFAULT == app_policy)
{
@@ -301,7 +302,7 @@ void LLAppCoreHttp::refreshSettings(bool initial)
for (int i(0); i < LL_ARRAY_SIZE(init_data); ++i)
{
- const EAppPolicy app_policy(init_data[i].mPolicy);
+ const EAppPolicy app_policy(static_cast<EAppPolicy>(i));
if (initial)
{
@@ -326,6 +327,10 @@ void LLAppCoreHttp::refreshSettings(bool initial)
if (mPipelined && init_data[i].mPipelined)
{
// Pipelining election is currently static (init-time).
+ // Making it dynamic isn't too hard in the SL code but verifying
+ // that libcurl handles the on-to-off transition while holding
+ // outstanding requests is something that should be tested.
+
status = LLCore::HttpRequest::setStaticPolicyOption(LLCore::HttpRequest::PO_PIPELINING_DEPTH,
mHttpClasses[app_policy].mPolicy,
PIPELINING_DEPTH,