summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/app_settings/settings.xml14
-rwxr-xr-xindra/newview/llappcorehttp.cpp23
-rwxr-xr-xindra/newview/llmeshrepository.cpp4
3 files changed, 27 insertions, 14 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 344079b640..770a8529f1 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9708,11 +9708,21 @@
<key>Value</key>
<real>16</real>
</map>
-
+ <key>Mesh2MaxConcurrentRequests</key>
+ <map>
+ <key>Comment</key>
+ <string>Number of connections to use for loading meshes.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>8</integer>
+ </map>
<key>MeshMaxConcurrentRequests</key>
<map>
<key>Comment</key>
- <string>Number of threads to use for loading meshes.</string>
+ <string>Number of connections to use for loading meshes (legacy system).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp
index b90b9749f9..01317fe32f 100755
--- a/indra/newview/llappcorehttp.cpp
+++ b/indra/newview/llappcorehttp.cpp
@@ -32,6 +32,13 @@
#include "llviewercontrol.h"
+// Here is where we begin to get our connection usage under control.
+// This establishes llcorehttp policy classes that, among other
+// things, limit the maximum number of connections to outside
+// services. Each of the entries below maps to a policy class and
+// has a limit, sometimes configurable, of how many connections can
+// be open at a time.
+
const F64 LLAppCoreHttp::MAX_THREAD_WAIT_TIME(10.0);
static const struct
{
@@ -39,34 +46,33 @@ static const struct
U32 mDefault;
U32 mMin;
U32 mMax;
- U32 mDivisor;
U32 mRate;
std::string mKey;
const char * mUsage;
} init_data[] = // Default and dynamic values for classes
{
{
- LLAppCoreHttp::AP_TEXTURE, 8, 1, 12, 1, 0,
+ LLAppCoreHttp::AP_TEXTURE, 8, 1, 12, 0,
"TextureFetchConcurrency",
"texture fetch"
},
{
- LLAppCoreHttp::AP_MESH1, 32, 1, 128, 1, 100,
+ LLAppCoreHttp::AP_MESH1, 32, 1, 128, 100,
"MeshMaxConcurrentRequests",
"mesh fetch"
},
{
- LLAppCoreHttp::AP_MESH2, 8, 1, 32, 4, 100,
- "MeshMaxConcurrentRequests",
+ LLAppCoreHttp::AP_MESH2, 8, 1, 32, 100,
+ "Mesh2MaxConcurrentRequests",
"mesh2 fetch"
},
{
- LLAppCoreHttp::AP_LARGE_MESH, 2, 1, 8, 1, 0,
+ LLAppCoreHttp::AP_LARGE_MESH, 2, 1, 8, 0,
"",
"large mesh fetch"
},
{
- LLAppCoreHttp::AP_UPLOADS, 2, 1, 8, 1, 0,
+ LLAppCoreHttp::AP_UPLOADS, 2, 1, 8, 0,
"",
"asset upload"
}
@@ -298,8 +304,7 @@ void LLAppCoreHttp::refreshSettings(bool initial)
if (new_setting)
{
// Treat zero settings as an ask for default
- setting = new_setting / init_data[i].mDivisor;
- setting = llclamp(setting, init_data[i].mMin, init_data[i].mMax);
+ setting = llclamp(new_setting, init_data[i].mMin, init_data[i].mMax);
}
}
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index e9b1a10e73..7146c7f4f5 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2897,9 +2897,7 @@ void LLMeshRepository::notifyLoadedMeshes()
else
{
// GetMesh2 operation with keepalives, etc.
- // *TODO: Logic here is replicated from llappcorehttp.cpp, should really
- // unify this and keep it in one place only.
- LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("MeshMaxConcurrentRequests") / 4;
+ LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("Mesh2MaxConcurrentRequests");
LLMeshRepoThread::sRequestHighWater = llclamp(5 * S32(LLMeshRepoThread::sMaxConcurrentRequests),
REQUEST_HIGH_WATER_MIN,
REQUEST_HIGH_WATER_MAX);