* C# compiler is not smart enough to understand ClientLoop is under very heavy usage and inline DebugPacket, so DebugPacket is run as a method, causing Packet

to be constantly pushed and popped uselessly, if you are not debugging packets. This showed some really big difference in a mock test, let's see how it behaves here.
0.6.6-post-fixes
Arthur Valadares 2009-06-29 19:24:30 +00:00
parent 7bb070be55
commit 4f6efa0249
1 changed files with 26 additions and 27 deletions

View File

@ -808,8 +808,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
protected void DebugPacket(string direction, Packet packet)
{
if (m_debugPacketLevel > 0)
{
string info;
@ -836,7 +834,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Console.WriteLine(m_circuitCode + ":" + direction + ": " + info);
}
}
/// <summary>
/// Main packet processing loop for the UDP component of the client session. Both incoming and outgoing
@ -853,11 +850,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (nextPacket.Incoming)
{
if (m_debugPacketLevel > 0)
DebugPacket("IN", nextPacket.Packet);
m_PacketHandler.ProcessInPacket(nextPacket);
}
else
{
if (m_debugPacketLevel > 0)
DebugPacket("OUT", nextPacket.Packet);
m_PacketHandler.ProcessOutPacket(nextPacket);
}