From 4b75353cbf50de3cae4c48ec90b55f30c1612c92 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 15 Oct 2009 16:35:27 -0700 Subject: Object update prioritization by Jim Greensky of Intel Labs, part one. This implements a simple distance prioritizer based on initial agent positions. Re-prioritizing and more advanced priority algorithms will follow soon --- OpenSim/Region/Framework/Scenes/SceneViewer.cs | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneViewer.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index 8ab0552..e4296ef 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs @@ -45,14 +45,6 @@ namespace OpenSim.Region.Framework.Scenes protected Dictionary m_updateTimes = new Dictionary(); - protected int m_maxPrimsPerFrame = 200; - - public int MaxPrimsPerFrame - { - get { return m_maxPrimsPerFrame; } - set { m_maxPrimsPerFrame = value; } - } - public SceneViewer() { } @@ -82,16 +74,7 @@ namespace OpenSim.Region.Framework.Scenes { m_pendingObjects = new Queue(); - List ents = new List(m_presence.Scene.Entities); - if (!m_presence.IsChildAgent) // Proximity sort makes no sense for - { // Child agents - ents.Sort(delegate(EntityBase a, EntityBase b) - { - return Vector3.Distance(m_presence.AbsolutePosition, a.AbsolutePosition).CompareTo(Vector3.Distance(m_presence.AbsolutePosition, b.AbsolutePosition)); - }); - } - - foreach (EntityBase e in ents) + foreach (EntityBase e in m_presence.Scene.Entities) { if (e is SceneObjectGroup) m_pendingObjects.Enqueue((SceneObjectGroup)e); @@ -99,7 +82,7 @@ namespace OpenSim.Region.Framework.Scenes } } - while (m_pendingObjects != null && m_pendingObjects.Count > 0 && m_partsUpdateQueue.Count < m_maxPrimsPerFrame) + while (m_pendingObjects != null && m_pendingObjects.Count > 0) { SceneObjectGroup g = m_pendingObjects.Dequeue(); @@ -183,8 +166,6 @@ namespace OpenSim.Region.Framework.Scenes m_presence.GenerateClientFlags(part.UUID)); } } - - m_presence.ControllingClient.FlushPrimUpdates(); } public void Reset() -- cgit v1.1