FIRE-11451: Cap concurrent mesh requests at a sane value.

Mon, 24 Feb 2014 18:36:29 -0600

author
Tonya Souther <tonya.souther@gmail.com>
date
Mon, 24 Feb 2014 18:36:29 -0600
changeset 40764
f25b8b4f3643
parent 40763
1a7ed603a70c
child 40765
25041031792d

FIRE-11451: Cap concurrent mesh requests at a sane value.
Retrofitting post-HTTP merge; extended to handle the new mesh debug setting name.

indra/newview/app_settings/settings.xml file | annotate | diff | revisions
indra/newview/llmeshrepository.cpp file | annotate | diff | revisions
indra/newview/skins/default/xui/en/notifications.xml file | annotate | diff | revisions
     1.1 --- a/indra/newview/app_settings/settings.xml	Mon Feb 24 13:57:12 2014 -0800
     1.2 +++ b/indra/newview/app_settings/settings.xml	Mon Feb 24 18:36:29 2014 -0600
     1.3 @@ -12630,6 +12630,14 @@
     1.4      <string>U32</string>
     1.5      <key>Value</key>
     1.6      <integer>8</integer>
     1.7 +    <key>SanityCheckType</key>
     1.8 +    <string>LessThan</string>
     1.9 +    <key>SanityValue</key>
    1.10 +    <array>
    1.11 +      <integer>13</integer>
    1.12 +    </array>
    1.13 +    <key>SanityComment</key>
    1.14 +    <string>Setting this value too high will make it less likely that mesh objects will load correctly and cause performace degradation for you and others in the same region.</string>
    1.15    </map>
    1.16    <key>MeshMaxConcurrentRequests</key>
    1.17    <map>
    1.18 @@ -12640,7 +12648,15 @@
    1.19      <key>Type</key>
    1.20      <string>U32</string>
    1.21      <key>Value</key>
    1.22 -    <integer>32</integer>
    1.23 +    <integer>16</integer>
    1.24 +    <key>SanityCheckType</key>
    1.25 +    <string>LessThan</string>
    1.26 +    <key>SanityValue</key>
    1.27 +    <array>
    1.28 +      <integer>33</integer>
    1.29 +    </array>
    1.30 +    <key>SanityComment</key>
    1.31 +    <string>Setting this value too high will make it less likely that mesh objects will load correctly and cause performace degradation for you and others in the same region.</string>
    1.32    </map>
    1.33    <key>MeshUseHttpRetryAfter</key>
    1.34    <map>
     2.1 --- a/indra/newview/llmeshrepository.cpp	Mon Feb 24 13:57:12 2014 -0800
     2.2 +++ b/indra/newview/llmeshrepository.cpp	Mon Feb 24 18:36:29 2014 -0600
     2.3 @@ -377,6 +377,13 @@
     2.4  // See wiki at https://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format
     2.5  const S32 MAX_MESH_VERSION = 999;
     2.6  
     2.7 +//<FS:TS> FIRE-11451: Cap concurrent mesh requests at a sane value 
     2.8 +const U32 MESH_CONCURRENT_REQUEST_LIMIT = 64;  // upper limit 
     2.9 +const U32 MESH_CONCURRENT_REQUEST_RESET = 16;  // reset to this if too high 
    2.10 +const U32 MESH2_CONCURRENT_REQUEST_LIMIT = 32;  // upper limit 
    2.11 +const U32 MESH2_CONCURRENT_REQUEST_RESET = 8;  // reset to this if too high 
    2.12 +//</FS:TS> FIRE-11451 
    2.13 +
    2.14  U32 LLMeshRepository::sBytesReceived = 0;
    2.15  U32 LLMeshRepository::sMeshRequestCount = 0;
    2.16  U32 LLMeshRepository::sHTTPRequestCount = 0;
    2.17 @@ -3195,6 +3202,18 @@
    2.18  		// <FS:Ansariel> Use faster LLCachedControls for frequently visited locations
    2.19  		//LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("MeshMaxConcurrentRequests");
    2.20  		static LLCachedControl<U32> meshMaxConcurrentRequests(gSavedSettings, "MeshMaxConcurrentRequests");
    2.21 +		//<FS:TS> FIRE-11451: Cap concurrent requests at a sane value 
    2.22 +		if ((U32)meshMaxConcurrentRequests > MESH_CONCURRENT_REQUEST_LIMIT) 
    2.23 +		{ 
    2.24 +			LLSD args; 
    2.25 +			args["VALUE"] = llformat("%d", (U32)meshMaxConcurrentRequests); 
    2.26 +			args["MAX"] = llformat("%d", MESH_CONCURRENT_REQUEST_LIMIT); 
    2.27 +			args["DEFAULT"] = llformat("%d", MESH_CONCURRENT_REQUEST_RESET);
    2.28 +			args["DEBUGNAME"] = "MeshMaxConccurrentRequests";
    2.29 +			LLNotificationsUtil::add("MeshMaxConcurrentReqTooHigh", args); 
    2.30 +			gSavedSettings.setU32("MeshMaxConcurrentRequests",MESH_CONCURRENT_REQUEST_RESET);
    2.31 +		}
    2.32 +		//</FS:TS> FIRE-11451 
    2.33  		LLMeshRepoThread::sMaxConcurrentRequests = (U32)meshMaxConcurrentRequests;
    2.34  		// </FS:Ansariel>
    2.35  		LLMeshRepoThread::sRequestHighWater = llclamp(2 * S32(LLMeshRepoThread::sMaxConcurrentRequests),
    2.36 @@ -3211,6 +3230,18 @@
    2.37  		// <FS:TM> Use faster LLCachedControls for frequently visited locations
    2.38  		//LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("Mesh2MaxConcurrentRequests");
    2.39  		static LLCachedControl<U32> mesh2MaxConcurrentRequests(gSavedSettings, "Mesh2MaxConcurrentRequests");
    2.40 +		//<FS:TS> FIRE-11451: Cap concurrent requests at a sane value 
    2.41 +		if ((U32)mesh2MaxConcurrentRequests > MESH2_CONCURRENT_REQUEST_LIMIT) 
    2.42 +		{ 
    2.43 +			LLSD args; 
    2.44 +			args["VALUE"] = llformat("%d", (U32)mesh2MaxConcurrentRequests); 
    2.45 +			args["MAX"] = llformat("%d", MESH2_CONCURRENT_REQUEST_LIMIT); 
    2.46 +			args["DEFAULT"] = llformat("%d", MESH2_CONCURRENT_REQUEST_RESET);
    2.47 +			args["DEBUGNAME"] = "Mesh2MaxConccurrentRequests";
    2.48 +			LLNotificationsUtil::add("MeshMaxConcurrentReqTooHigh", args); 
    2.49 +			gSavedSettings.setU32("Mesh2MaxConcurrentRequests",MESH2_CONCURRENT_REQUEST_RESET);
    2.50 +		}
    2.51 +		//</FS:TS> FIRE-11451 
    2.52  		LLMeshRepoThread::sMaxConcurrentRequests = (U32)mesh2MaxConcurrentRequests;
    2.53  		// </FS:TM>
    2.54  		LLMeshRepoThread::sRequestHighWater = llclamp(5 * S32(LLMeshRepoThread::sMaxConcurrentRequests),
     3.1 --- a/indra/newview/skins/default/xui/en/notifications.xml	Mon Feb 24 13:57:12 2014 -0800
     3.2 +++ b/indra/newview/skins/default/xui/en/notifications.xml	Mon Feb 24 18:36:29 2014 -0600
     3.3 @@ -11568,6 +11568,14 @@
     3.4        <tag>Export</tag>
     3.5  		Successfully saved [OBJECT] to [FILENAME].
     3.6      </notification>
     3.7 +
     3.8 +    <notification
     3.9 +     icon="alertmodal.tga"
    3.10 +     name="MeshMaxConcurrentReqTooHigh"
    3.11 +     type="alertmodal">
    3.12 +The value you set, [VALUE], for the number of concurrent requests to load mesh objects (debug setting [DEBUGNAME]) is higher than the maximum of [MAX]. It has been reset to the default of [DEFAULT].
    3.13 +    <tag>fail</tag>
    3.14 +    </notification>
    3.15  	
    3.16      <notification
    3.17       icon="alertmodal.tga"

mercurial