From fa060a7282c4db10256eadd30b3db46ba7085bc6 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Thu, 25 Jun 2009 07:59:38 +0000 Subject: [PATCH] commenting out rather expensive bits of GetClientInfo() --- the only bit of GetClientInfo that is actually used seems to be userEP as part of the OSSL osGetAgentIP() script function. Now commented are the parts where we serialize and copy out the *entire* packet queue of the client (locking the packet handler in the process). --- .../ClientStack/LindenUDP/LLPacketHandler.cs | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index 39922c0118..a1a8e00425 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs @@ -638,22 +638,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP public ClientInfo GetClientInfo() { ClientInfo info = new ClientInfo(); - info.pendingAcks = m_PendingAcks; - info.needAck = new Dictionary(); - lock (m_NeedAck) - { - foreach (uint key in m_NeedAck.Keys) - info.needAck.Add(key, m_NeedAck[key].Packet.ToBytes()); - } + // nobody seems to even look at the following data. since + // it's a rather expensive operation (lock, serializing + // packets, copying it into dictionary, etc) i've + // commented out the expensive (but unwanted?) bits below + // (dr scofield, 2009-06-24) - LLQueItem[] queitems = m_PacketQueue.GetQueueArray(); + // info.pendingAcks = m_PendingAcks; + // info.needAck = new Dictionary(); - for (int i = 0; i < queitems.Length; i++) - { - if (queitems[i].Incoming == false) - info.out_packets.Add(queitems[i].Packet.ToBytes()); - } + // lock (m_NeedAck) + // { + // foreach (uint key in m_NeedAck.Keys) + // info.needAck.Add(key, m_NeedAck[key].Packet.ToBytes()); + // } + + // LLQueItem[] queitems = m_PacketQueue.GetQueueArray(); + + // for (int i = 0; i < queitems.Length; i++) + // { + // if (queitems[i].Incoming == false) + // info.out_packets.Add(queitems[i].Packet.ToBytes()); + // } info.sequence = m_Sequence;