furhter shorten CheckAgentUpdateSignificance(). No real perf impact.

cpu-performance
Justin Clark-Casey (justincc) 2013-07-19 01:00:38 +01:00
parent 42e5856464
commit 07420a3b4d
1 changed files with 5 additions and 7 deletions

View File

@ -5582,8 +5582,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// These should be ordered from most-likely to // These should be ordered from most-likely to
// least likely to change. I've made an initial // least likely to change. I've made an initial
// guess at that. // guess at that.
bool update = if (
(
(x.BodyRotation != m_lastAgentUpdateArgs.BodyRotation) || (x.BodyRotation != m_lastAgentUpdateArgs.BodyRotation) ||
(x.CameraAtAxis != m_lastAgentUpdateArgs.CameraAtAxis) || (x.CameraAtAxis != m_lastAgentUpdateArgs.CameraAtAxis) ||
(x.CameraCenter != m_lastAgentUpdateArgs.CameraCenter) || (x.CameraCenter != m_lastAgentUpdateArgs.CameraCenter) ||
@ -5596,10 +5595,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
(x.HeadRotation != m_lastAgentUpdateArgs.HeadRotation) || (x.HeadRotation != m_lastAgentUpdateArgs.HeadRotation) ||
(x.SessionID != m_lastAgentUpdateArgs.SessionID) || (x.SessionID != m_lastAgentUpdateArgs.SessionID) ||
(x.AgentID != m_lastAgentUpdateArgs.AgentID) (x.AgentID != m_lastAgentUpdateArgs.AgentID)
); )
if (update)
{ {
// m_log.DebugFormat("[LLCLIENTVIEW]: Triggered AgentUpdate for {0}", sener.Name); // m_log.DebugFormat("[LLCLIENTVIEW]: Triggered AgentUpdate for {0}", sener.Name);
TotalSignificantAgentUpdates++; TotalSignificantAgentUpdates++;
@ -5616,9 +5612,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_lastAgentUpdateArgs.HeadRotation = x.HeadRotation; m_lastAgentUpdateArgs.HeadRotation = x.HeadRotation;
m_lastAgentUpdateArgs.SessionID = x.SessionID; m_lastAgentUpdateArgs.SessionID = x.SessionID;
m_lastAgentUpdateArgs.State = x.State; m_lastAgentUpdateArgs.State = x.State;
return true;
} }
return update; return false;
} }
private bool HandleAgentUpdate(IClientAPI sener, Packet packet) private bool HandleAgentUpdate(IClientAPI sener, Packet packet)