From 549e20cf7766dc7fba2f42883659a6bcac863d91 Mon Sep 17 00:00:00 2001 From: Monty Brandenberg Date: Mon, 5 Aug 2013 13:54:14 -0400 Subject: Change the setting for GetMesh2 meshes to Mesh2MaxConcurrentRequests. While linking GetMesh2 to the old setting was simpler from a user point-of-view, they really shouldn't be linked and the old one will go away. This one may be renamed to AssetMaxConcurrentRequests or something similar if we get to the mesh/texture unification step. --- indra/newview/app_settings/settings.xml | 14 ++++++++++++-- indra/newview/llappcorehttp.cpp | 23 ++++++++++++++--------- indra/newview/llmeshrepository.cpp | 4 +--- 3 files changed, 27 insertions(+), 14 deletions(-) (limited to 'indra/newview') 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 @@ Value 16 - + Mesh2MaxConcurrentRequests + + Comment + Number of connections to use for loading meshes. + Persist + 1 + Type + U32 + Value + 8 + MeshMaxConcurrentRequests Comment - Number of threads to use for loading meshes. + Number of connections to use for loading meshes (legacy system). Persist 1 Type 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); -- cgit v1.2.3