aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-21 11:59:48 -0700
committerJohn Hurliman2009-10-21 11:59:48 -0700
commit9178537e9414478f0a9bd84bb5e106b2f15640c3 (patch)
treec21bca46c08cdc9868ca7608856f51d029207aab /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
parentFixed the way OnQueueEmpty is called to prevent simultaneous calls for the sa... (diff)
downloadopensim-SC_OLD-9178537e9414478f0a9bd84bb5e106b2f15640c3.zip
opensim-SC_OLD-9178537e9414478f0a9bd84bb5e106b2f15640c3.tar.gz
opensim-SC_OLD-9178537e9414478f0a9bd84bb5e106b2f15640c3.tar.bz2
opensim-SC_OLD-9178537e9414478f0a9bd84bb5e106b2f15640c3.tar.xz
* Replaced the UnackedPacketCollection with a lockless implementation. The tiny amount of time spent in the locks turned into a lot of time when the rest of the LLUDP implementation went lockless
* Changed the timer tracking numbers for each client to not have "memory". It will no longer queue up calls to functions like ResendUnacked * Reverted Jim's WaitHandle code. Although it was technically more correct, it exhibited the exact same behavior as the old code but spent more cycles. The 20ms has been replaced with the minimum amount of time before a token bucket could receive a drip, and an else { sleep(0); } was added to make sure the outgoing packet handler always yields at least a minimum amount
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs11
1 files changed, 2 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 38bbce0..997f38c 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1228,10 +1228,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1228 StartPingCheckPacket pc = (StartPingCheckPacket)PacketPool.Instance.GetPacket(PacketType.StartPingCheck); 1228 StartPingCheckPacket pc = (StartPingCheckPacket)PacketPool.Instance.GetPacket(PacketType.StartPingCheck);
1229 pc.Header.Reliable = false; 1229 pc.Header.Reliable = false;
1230 1230
1231 OutgoingPacket oldestPacket = m_udpClient.NeedAcks.GetOldest();
1232
1233 pc.PingID.PingID = seq; 1231 pc.PingID.PingID = seq;
1234 pc.PingID.OldestUnacked = (oldestPacket != null) ? oldestPacket.SequenceNumber : 0; 1232 // We *could* get OldestUnacked, but it would hurt performance and not provide any benefit
1233 pc.PingID.OldestUnacked = 0;
1235 1234
1236 OutPacket(pc, ThrottleOutPacketType.Unknown); 1235 OutPacket(pc, ThrottleOutPacketType.Unknown);
1237 } 1236 }
@@ -3320,8 +3319,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3320 // If we received an update about our own avatar, process the avatar update priority queue immediately 3319 // If we received an update about our own avatar, process the avatar update priority queue immediately
3321 if (data.AgentID == m_agentId) 3320 if (data.AgentID == m_agentId)
3322 ProcessAvatarTerseUpdates(); 3321 ProcessAvatarTerseUpdates();
3323 else
3324 m_udpServer.SignalOutgoingPacketHandler();
3325 } 3322 }
3326 3323
3327 private void ProcessAvatarTerseUpdates() 3324 private void ProcessAvatarTerseUpdates()
@@ -3409,8 +3406,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3409 3406
3410 lock (m_primFullUpdates.SyncRoot) 3407 lock (m_primFullUpdates.SyncRoot)
3411 m_primFullUpdates.Enqueue(data.priority, objectData, data.localID); 3408 m_primFullUpdates.Enqueue(data.priority, objectData, data.localID);
3412
3413 m_udpServer.SignalOutgoingPacketHandler();
3414 } 3409 }
3415 3410
3416 void ProcessPrimFullUpdates() 3411 void ProcessPrimFullUpdates()
@@ -3454,8 +3449,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3454 3449
3455 lock (m_primTerseUpdates.SyncRoot) 3450 lock (m_primTerseUpdates.SyncRoot)
3456 m_primTerseUpdates.Enqueue(data.Priority, objectData, data.LocalID); 3451 m_primTerseUpdates.Enqueue(data.Priority, objectData, data.LocalID);
3457
3458 m_udpServer.SignalOutgoingPacketHandler();
3459 } 3452 }
3460 3453
3461 void ProcessPrimTerseUpdates() 3454 void ProcessPrimTerseUpdates()