diff options
author | Justin Clark-Casey (justincc) | 2012-10-17 23:08:14 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-17 23:08:14 +0100 |
commit | faf6b568393d8edfed103e0a656c98322c195e95 (patch) | |
tree | a85ae4d98d4c48b68591420ec43af156293106b9 /OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs | |
parent | If RecycleBaseUDPPackets = true, also pool IncomingPackets to reduce memory c... (diff) | |
download | opensim-SC_OLD-faf6b568393d8edfed103e0a656c98322c195e95.zip opensim-SC_OLD-faf6b568393d8edfed103e0a656c98322c195e95.tar.gz opensim-SC_OLD-faf6b568393d8edfed103e0a656c98322c195e95.tar.bz2 opensim-SC_OLD-faf6b568393d8edfed103e0a656c98322c195e95.tar.xz |
Explicitly return only the incoming AgentUpdate packet as this is the only one we pool atm, rather than attempting to return all incoming packets.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs index 71f6fe1..2a3d14f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs | |||
@@ -108,15 +108,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
108 | { | 108 | { |
109 | if (!pool.ContainsKey(type) || pool[type] == null || (pool[type]).Count == 0) | 109 | if (!pool.ContainsKey(type) || pool[type] == null || (pool[type]).Count == 0) |
110 | { | 110 | { |
111 | // m_log.DebugFormat("[PACKETPOOL]: Building {0} packet", type); | ||
112 | |||
111 | // Creating a new packet if we cannot reuse an old package | 113 | // Creating a new packet if we cannot reuse an old package |
112 | packet = Packet.BuildPacket(type); | 114 | packet = Packet.BuildPacket(type); |
113 | } | 115 | } |
114 | else | 116 | else |
115 | { | 117 | { |
118 | // m_log.DebugFormat("[PACKETPOOL]: Pulling {0} packet", type); | ||
119 | |||
116 | // Recycle old packages | 120 | // Recycle old packages |
117 | m_packetsReusedStat.Antecedent++; | 121 | m_packetsReusedStat.Antecedent++; |
118 | 122 | ||
119 | packet = (pool[type]).Pop(); | 123 | packet = pool[type].Pop(); |
120 | } | 124 | } |
121 | } | 125 | } |
122 | 126 | ||
@@ -227,7 +231,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
227 | 231 | ||
228 | if ((pool[type]).Count < 50) | 232 | if ((pool[type]).Count < 50) |
229 | { | 233 | { |
230 | (pool[type]).Push(packet); | 234 | // m_log.DebugFormat("[PACKETPOOL]: Pushing {0} packet", type); |
235 | |||
236 | pool[type].Push(packet); | ||
231 | } | 237 | } |
232 | } | 238 | } |
233 | break; | 239 | break; |