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.
This commit is contained in:
Dan Lake
2011-11-11 17:16:52 -08:00
parent e61ea79c72
commit 5fd1749150
7 changed files with 22 additions and 427 deletions

View File

@@ -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<ulong, string> 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);
}
/// <summary>
/// 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.
/// </summary>
public void SendPrimUpdates()
{
SceneViewer.SendPrimUpdates();
}
#region Status Methods
/// <summary>
@@ -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;