From 1e9cb2f8fcaf4f4210121ed7536ea33a9ab2db30 Mon Sep 17 00:00:00 2001 From: diva Date: Fri, 29 May 2009 01:26:53 +0000 Subject: Making the delegate handlers async in async Get, to make things consistent. Them being synchronous in certain cases (asset in cache, for example) may account for slowness reported by folks in osgrid when they have the cache module on. Turns out that some of the provided handlers do non-trivial processing (the ones coming from J2KImage, for example), which means that the several asset requests that hit the cache end up being synchronous. The jury is still out on this. --- .../CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs | 4 ++-- OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs index 3750991..527f364 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs @@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset if (asset != null) { - handler(id, sender, asset); + handler.BeginInvoke(id, sender, asset, null, null); return true; } @@ -209,7 +209,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset { if ((a != null) && (m_Cache != null)) m_Cache.Cache(a); - handler(assetID, s, a); + handler.BeginInvoke(assetID, s, a, null, null); }); } diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index 950cf47..c80fed0 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs @@ -177,7 +177,7 @@ namespace OpenSim.Services.Connectors } else { - handler(id, sender, asset); + handler.BeginInvoke(id, sender, asset, null, null); } return true; -- cgit v1.1