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.
master
Monty Brandenberg 2013-08-05 13:54:14 -04:00
parent f3927c6ca2
commit 549e20cf77
3 changed files with 27 additions and 14 deletions

View File

@ -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>

View File

@ -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);
}
}

View File

@ -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);