diff options
author | Mic Bowman | 2012-10-04 08:41:06 -0700 |
---|---|---|
committer | Mic Bowman | 2012-10-04 08:41:06 -0700 |
commit | d98af79f7727fd5d3cd94537b5b4d514f54f5250 (patch) | |
tree | 6b2dc69b13089e56e9f7e4d9bfea98671fed8b24 | |
parent | Allow default animation to be stopped to be replaced with another one. (diff) | |
download | opensim-SC-d98af79f7727fd5d3cd94537b5b4d514f54f5250.zip opensim-SC-d98af79f7727fd5d3cd94537b5b4d514f54f5250.tar.gz opensim-SC-d98af79f7727fd5d3cd94537b5b4d514f54f5250.tar.bz2 opensim-SC-d98af79f7727fd5d3cd94537b5b4d514f54f5250.tar.xz |
Make the asset retrieval concurrency a config switch. The current value
of 30 is still hanging badly on some mono versions. The switch defaults to
30 to preserve current behavior.
-rw-r--r-- | OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 11 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 086b5ad..2b2f11f 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | |||
@@ -47,7 +47,8 @@ namespace OpenSim.Services.Connectors | |||
47 | 47 | ||
48 | private string m_ServerURI = String.Empty; | 48 | private string m_ServerURI = String.Empty; |
49 | private IImprovedAssetCache m_Cache = null; | 49 | private IImprovedAssetCache m_Cache = null; |
50 | 50 | private int m_maxAssetRequestConcurrency = 30; | |
51 | |||
51 | private delegate void AssetRetrievedEx(AssetBase asset); | 52 | private delegate void AssetRetrievedEx(AssetBase asset); |
52 | 53 | ||
53 | // Keeps track of concurrent requests for the same asset, so that it's only loaded once. | 54 | // Keeps track of concurrent requests for the same asset, so that it's only loaded once. |
@@ -71,6 +72,10 @@ namespace OpenSim.Services.Connectors | |||
71 | 72 | ||
72 | public virtual void Initialise(IConfigSource source) | 73 | public virtual void Initialise(IConfigSource source) |
73 | { | 74 | { |
75 | IConfig netconfig = source.Configs["Network"]; | ||
76 | if (netconfig != null) | ||
77 | m_maxAssetRequestConcurrency = netconfig.GetInt("MaxRequestConcurrency",m_maxAssetRequestConcurrency); | ||
78 | |||
74 | IConfig assetConfig = source.Configs["AssetService"]; | 79 | IConfig assetConfig = source.Configs["AssetService"]; |
75 | if (assetConfig == null) | 80 | if (assetConfig == null) |
76 | { | 81 | { |
@@ -108,7 +113,7 @@ namespace OpenSim.Services.Connectors | |||
108 | if (asset == null) | 113 | if (asset == null) |
109 | { | 114 | { |
110 | asset = SynchronousRestObjectRequester. | 115 | asset = SynchronousRestObjectRequester. |
111 | MakeRequest<int, AssetBase>("GET", uri, 0, 30); | 116 | MakeRequest<int, AssetBase>("GET", uri, 0, m_maxAssetRequestConcurrency); |
112 | 117 | ||
113 | if (m_Cache != null) | 118 | if (m_Cache != null) |
114 | m_Cache.Cache(asset); | 119 | m_Cache.Cache(asset); |
@@ -221,7 +226,7 @@ namespace OpenSim.Services.Connectors | |||
221 | m_AssetHandlers.Remove(id); | 226 | m_AssetHandlers.Remove(id); |
222 | } | 227 | } |
223 | handlers.Invoke(a); | 228 | handlers.Invoke(a); |
224 | }, 30); | 229 | }, m_maxAssetRequestConcurrency); |
225 | 230 | ||
226 | success = true; | 231 | success = true; |
227 | } | 232 | } |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 6e6a089..677ac74 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -427,6 +427,10 @@ | |||
427 | ; " (Mozilla Compatible)" to the text where there are problems with a web server | 427 | ; " (Mozilla Compatible)" to the text where there are problems with a web server |
428 | ;user_agent = "OpenSim LSL (Mozilla Compatible)" | 428 | ;user_agent = "OpenSim LSL (Mozilla Compatible)" |
429 | 429 | ||
430 | ; OpenSim can send multiple simultaneous requests for services such as asset | ||
431 | ; retrieval. However, some versions of mono appear to hang when there are too | ||
432 | ; many simultaneous requests, default is 30 and is currently applied only to assets | ||
433 | ;MaxRequestConcurrency = 30 | ||
430 | 434 | ||
431 | [XMLRPC] | 435 | [XMLRPC] |
432 | ; ## | 436 | ; ## |