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.connector_plugin
parent
b977f962fa
commit
d98af79f77
|
@ -47,7 +47,8 @@ namespace OpenSim.Services.Connectors
|
|||
|
||||
private string m_ServerURI = String.Empty;
|
||||
private IImprovedAssetCache m_Cache = null;
|
||||
|
||||
private int m_maxAssetRequestConcurrency = 30;
|
||||
|
||||
private delegate void AssetRetrievedEx(AssetBase asset);
|
||||
|
||||
// Keeps track of concurrent requests for the same asset, so that it's only loaded once.
|
||||
|
@ -71,6 +72,10 @@ namespace OpenSim.Services.Connectors
|
|||
|
||||
public virtual void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig netconfig = source.Configs["Network"];
|
||||
if (netconfig != null)
|
||||
m_maxAssetRequestConcurrency = netconfig.GetInt("MaxRequestConcurrency",m_maxAssetRequestConcurrency);
|
||||
|
||||
IConfig assetConfig = source.Configs["AssetService"];
|
||||
if (assetConfig == null)
|
||||
{
|
||||
|
@ -108,7 +113,7 @@ namespace OpenSim.Services.Connectors
|
|||
if (asset == null)
|
||||
{
|
||||
asset = SynchronousRestObjectRequester.
|
||||
MakeRequest<int, AssetBase>("GET", uri, 0, 30);
|
||||
MakeRequest<int, AssetBase>("GET", uri, 0, m_maxAssetRequestConcurrency);
|
||||
|
||||
if (m_Cache != null)
|
||||
m_Cache.Cache(asset);
|
||||
|
@ -221,7 +226,7 @@ namespace OpenSim.Services.Connectors
|
|||
m_AssetHandlers.Remove(id);
|
||||
}
|
||||
handlers.Invoke(a);
|
||||
}, 30);
|
||||
}, m_maxAssetRequestConcurrency);
|
||||
|
||||
success = true;
|
||||
}
|
||||
|
|
|
@ -427,6 +427,10 @@
|
|||
; " (Mozilla Compatible)" to the text where there are problems with a web server
|
||||
;user_agent = "OpenSim LSL (Mozilla Compatible)"
|
||||
|
||||
; OpenSim can send multiple simultaneous requests for services such as asset
|
||||
; retrieval. However, some versions of mono appear to hang when there are too
|
||||
; many simultaneous requests, default is 30 and is currently applied only to assets
|
||||
;MaxRequestConcurrency = 30
|
||||
|
||||
[XMLRPC]
|
||||
; ##
|
||||
|
|
Loading…
Reference in New Issue