From cf24069227f9a32272c873d4423e2e11f5da25a8 Mon Sep 17 00:00:00 2001
From: Mic Bowman
Date: Thu, 3 Feb 2011 12:43:46 -0800
Subject: Change UpdateAgent (for changes in agent position) to be sent once to
each simulator rather than once to each region. This should help with some of
the delays caused by multiple outstanding requests to a single service point.
---
.../Framework/Scenes/SceneCommunicationService.cs | 43 +++++++++++-----------
1 file changed, 22 insertions(+), 21 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index f8ff308..837e655 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -193,7 +193,8 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, ulong regionHandle);
+ public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, GridRegion dest);
+
///
/// This informs all neighboring regions about the settings of it's child agent.
@@ -202,31 +203,17 @@ namespace OpenSim.Region.Framework.Scenes
/// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc.
///
///
- private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, ulong regionHandle)
+ private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, GridRegion dest)
{
//m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + m_regionInfo.RegionName);
try
{
- //m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle, cAgentData);
- uint x = 0, y = 0;
- Utils.LongToUInts(regionHandle, out x, out y);
- GridRegion destination = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
- m_scene.SimulationService.UpdateAgent(destination, cAgentData);
+ m_scene.SimulationService.UpdateAgent(dest, cAgentData);
}
catch
{
// Ignore; we did our best
}
-
- //if (regionAccepted)
- //{
- // //m_log.Info("[INTERGRID]: Completed sending a neighbor an update about my agent");
- //}
- //else
- //{
- // //m_log.Info("[INTERGRID]: Failed sending a neighbor an update about my agent");
- //}
-
}
private void SendChildAgentDataUpdateCompleted(IAsyncResult iar)
@@ -240,14 +227,28 @@ namespace OpenSim.Region.Framework.Scenes
// This assumes that we know what our neighbors are.
try
{
+ uint x = 0, y = 0;
+ List simulatorList = new List();
foreach (ulong regionHandle in presence.KnownChildRegionHandles)
{
if (regionHandle != m_regionInfo.RegionHandle)
{
- SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync;
- d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, regionHandle,
- SendChildAgentDataUpdateCompleted,
- d);
+ // we only want to send one update to each simulator; the simulator will
+ // hand it off to the regions where a child agent exists, this does assume
+ // that the region position is cached or performance will degrade
+ Utils.LongToUInts(regionHandle, out x, out y);
+ GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
+ if (! simulatorList.Contains(dest.ServerURI))
+ {
+ // we havent seen this simulator before, add it to the list
+ // and send it an update
+ simulatorList.Add(dest.ServerURI);
+
+ SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync;
+ d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest,
+ SendChildAgentDataUpdateCompleted,
+ d);
+ }
}
}
}
--
cgit v1.1
From 034327b51fc496702b84b101123140b017bf68ff Mon Sep 17 00:00:00 2001
From: Kevin Cozens
Date: Thu, 3 Feb 2011 12:03:17 -0500
Subject: Send object date to viewer in microseconds (Fixes mantis bug #3990)
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 4fcd8f5..6a92378 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2055,8 +2055,9 @@ namespace OpenSim.Region.Framework.Scenes
public void GetProperties(IClientAPI client)
{
+ //Viewer wants date in microseconds so multiply it by 1,000,000.
client.SendObjectPropertiesReply(
- m_fromUserInventoryItemID, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero,
+ m_fromUserInventoryItemID, (ulong)_creationDate*(ulong)1e6, _creatorID, UUID.Zero, UUID.Zero,
_groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID,
ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description,
ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask,
--
cgit v1.1
From 98ea78fc77b3dd6da185d71dfab402a0ef8780d6 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 6 Feb 2011 19:39:29 -0800
Subject: New command: show pending-objects
---
OpenSim/Region/Framework/Scenes/SceneViewer.cs | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
index b44a010..7c067ca 100644
--- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
@@ -205,6 +205,14 @@ namespace OpenSim.Region.Framework.Scenes
Reset();
}
+ public int GetPendingObjectsCount()
+ {
+ if (m_pendingObjects != null)
+ return m_pendingObjects.Count;
+
+ return 0;
+ }
+
public class ScenePartUpdate
{
public UUID FullID;
--
cgit v1.1
From ac7bc78555c1dd51724790032f0711b24bc8c67d Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 8 Feb 2011 12:06:14 -0800
Subject: Added emergency monitoring of UDP Outgoing packets thread. Just type
"emergency-monitoring on/off"
---
OpenSim/Region/Framework/Scenes/Scene.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 4fca261..355671c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -64,6 +64,8 @@ namespace OpenSim.Region.Framework.Scenes
#region Fields
+ public bool EmergencyMonitoring = false;
+
public SynchronizeSceneHandler SynchronizeScene;
public SimStatsReporter StatsReporter;
public List NorthBorders = new List();
--
cgit v1.1