From 5fd17491509fb4b939666cdc37951e213f054242 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Fri, 11 Nov 2011 17:16:52 -0800 Subject: Remove SceneViewer from ScenePresence to reduce quadruple queueing of prim update to only triple queuing. Existing method was: 1. Schedule prim for update, adding to scene update list 2. Update on SOGs during heartbeat queues update onto each SceneViewer 3. Update on SPs during heartbeat queues update onto each IClientAPI 4. ProcessEntityUpdates queues updates into UDP send stack Now the SceneViewer has been eliminated so updates are scheduled at any time and then put onto the IClientAPI priority queues immediately during SceneGraph.UpdateObjectGroups. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 28 ------------------------ 1 file changed, 28 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3fee642..a4cb7cf 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -135,7 +135,6 @@ namespace OpenSim.Region.Framework.Scenes private Vector3 m_lastPosition; private Quaternion m_lastRotation; private Vector3 m_lastVelocity; - //private int m_lastTerseSent; private Vector3? m_forceToApply; private int m_userFlags; @@ -644,14 +643,6 @@ namespace OpenSim.Region.Framework.Scenes set { m_health = value; } } - private ISceneViewer m_sceneViewer; - - public ISceneViewer SceneViewer - { - get { return m_sceneViewer; } - private set { m_sceneViewer = value; } - } - public void AdjustKnownSeeds() { Dictionary seeds; @@ -755,7 +746,6 @@ namespace OpenSim.Region.Framework.Scenes AttachmentsSyncLock = new Object(); m_sendCourseLocationsMethod = SendCoarseLocationsDefault; - SceneViewer = new SceneViewer(this); Animator = new ScenePresenceAnimator(this); PresenceType = type; DrawDistance = world.DefaultDrawDistance; @@ -866,16 +856,6 @@ namespace OpenSim.Region.Framework.Scenes return m_scene.Permissions.GenerateClientFlags(m_uuid, ObjectID); } - /// - /// Send updates to the client about prims which have been placed on the update queue. We don't - /// necessarily send updates for all the parts on the queue, e.g. if an updates with a more recent - /// timestamp has already been sent. - /// - public void SendPrimUpdates() - { - SceneViewer.SendPrimUpdates(); - } - #region Status Methods /// @@ -2412,10 +2392,6 @@ namespace OpenSim.Region.Framework.Scenes const float ROTATION_TOLERANCE = 0.01f; const float VELOCITY_TOLERANCE = 0.001f; const float POSITION_TOLERANCE = 0.05f; - //const int TIME_MS_TOLERANCE = 3000; - - if (!sendingPrims) - Util.FireAndForget(delegate { sendingPrims = true; SendPrimUpdates(); sendingPrims = false; }); if (IsChildAgent == false) { @@ -2427,7 +2403,6 @@ namespace OpenSim.Region.Framework.Scenes if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) - //Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) { SendTerseUpdateToAllClients(); @@ -2435,7 +2410,6 @@ namespace OpenSim.Region.Framework.Scenes m_lastPosition = m_pos; m_lastRotation = Rotation; m_lastVelocity = Velocity; - //m_lastTerseSent = Environment.TickCount; } // followed suggestion from mic bowman. reversed the two lines below. @@ -3418,8 +3392,6 @@ namespace OpenSim.Region.Framework.Scenes // unsetting the elapsed callback should be enough to allow for cleanup however. // m_reprioritizationTimer.Dispose(); - SceneViewer.Close(); - RemoveFromPhysicalScene(); Animator.Close(); Animator = null; -- cgit v1.1