From 1077d7b6f5874a036752f1ca672ce6b8c41004a0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 8 Jul 2012 21:53:23 +0200 Subject: Reinstate parallel fetching of residents and remove a left over return from debugging --- OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index a226b78..1dedcce 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -553,7 +553,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap /// public void process() { - const int MAX_ASYNC_REQUESTS = 5; + const int MAX_ASYNC_REQUESTS = 20; try { while (true) @@ -589,11 +589,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap if (dorequest && !m_blacklistedregions.ContainsKey(st.regionhandle)) { -// while (nAsyncRequests >= MAX_ASYNC_REQUESTS) // hit the break -// Thread.Sleep(500); + while (nAsyncRequests >= MAX_ASYNC_REQUESTS) // hit the break + Thread.Sleep(100); Interlocked.Increment(ref nAsyncRequests); - RequestMapItemsAsync(st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); + Util.FireAndForget(x => + { + RequestMapItemsAsync(st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); + }); } } @@ -766,7 +769,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap OSDMap responseMap = new OSDMap(); responseMap["requestID"] = OSD.FromUUID(requestID); -return; Stream os = null; try { // send the Post -- cgit v1.1