diff options
author | Teravus Ovares | 2007-11-22 23:56:44 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-11-22 23:56:44 +0000 |
commit | 2db19b7d657c236e6f5e085cea5269983b99f909 (patch) | |
tree | 7a0da676dc62a8dcc61be0a51543146a3d45e6e4 /OpenSim/Region/ClientStack | |
parent | * Added another code path to skip the packet throttle queues when there's no ... (diff) | |
download | opensim-SC_OLD-2db19b7d657c236e6f5e085cea5269983b99f909.zip opensim-SC_OLD-2db19b7d657c236e6f5e085cea5269983b99f909.tar.gz opensim-SC_OLD-2db19b7d657c236e6f5e085cea5269983b99f909.tar.bz2 opensim-SC_OLD-2db19b7d657c236e6f5e085cea5269983b99f909.tar.xz |
* Added more comments
* Tweaked the esoteric throttler parameters again.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.PacketQueue.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 3 |
2 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.PacketQueue.cs b/OpenSim/Region/ClientStack/ClientView.PacketQueue.cs index bd22970..1904bfa 100644 --- a/OpenSim/Region/ClientStack/ClientView.PacketQueue.cs +++ b/OpenSim/Region/ClientStack/ClientView.PacketQueue.cs | |||
@@ -231,7 +231,7 @@ namespace OpenSim.Region.ClientStack | |||
231 | switch (throttlePacketType) | 231 | switch (throttlePacketType) |
232 | { | 232 | { |
233 | case ThrottleOutPacketType.Resend: | 233 | case ThrottleOutPacketType.Resend: |
234 | if (ResendthrottleSentPeriod <= ResendthrottleOutbound && ResendOutgoingPacketQueue.Count == 0) | 234 | if (ResendthrottleSentPeriod <= ((int)(ResendthrottleOutbound / throttleTimeDivisor)) && ResendOutgoingPacketQueue.Count == 0) |
235 | { | 235 | { |
236 | throttleSentPeriod += item.Packet.ToBytes().Length; | 236 | throttleSentPeriod += item.Packet.ToBytes().Length; |
237 | ResendthrottleSentPeriod += item.Packet.ToBytes().Length; | 237 | ResendthrottleSentPeriod += item.Packet.ToBytes().Length; |
@@ -243,7 +243,7 @@ namespace OpenSim.Region.ClientStack | |||
243 | } | 243 | } |
244 | break; | 244 | break; |
245 | case ThrottleOutPacketType.Texture: | 245 | case ThrottleOutPacketType.Texture: |
246 | if (TexturethrottleSentPeriod <= TexturethrottleOutbound && TextureOutgoingPacketQueue.Count == 0) | 246 | if (TexturethrottleSentPeriod <= ((int)(TexturethrottleOutbound / throttleTimeDivisor)) && TextureOutgoingPacketQueue.Count == 0) |
247 | { | 247 | { |
248 | throttleSentPeriod += item.Packet.ToBytes().Length; | 248 | throttleSentPeriod += item.Packet.ToBytes().Length; |
249 | TexturethrottleSentPeriod += item.Packet.ToBytes().Length; | 249 | TexturethrottleSentPeriod += item.Packet.ToBytes().Length; |
@@ -255,7 +255,7 @@ namespace OpenSim.Region.ClientStack | |||
255 | } | 255 | } |
256 | break; | 256 | break; |
257 | case ThrottleOutPacketType.Task: | 257 | case ThrottleOutPacketType.Task: |
258 | if (TaskthrottleSentPeriod <= TaskthrottleOutbound && TaskOutgoingPacketQueue.Count == 0) | 258 | if (TaskthrottleSentPeriod <= ((int)(TexturethrottleOutbound / throttleTimeDivisor)) && TaskOutgoingPacketQueue.Count == 0) |
259 | { | 259 | { |
260 | throttleSentPeriod += item.Packet.ToBytes().Length; | 260 | throttleSentPeriod += item.Packet.ToBytes().Length; |
261 | TaskthrottleSentPeriod += item.Packet.ToBytes().Length; | 261 | TaskthrottleSentPeriod += item.Packet.ToBytes().Length; |
@@ -267,7 +267,7 @@ namespace OpenSim.Region.ClientStack | |||
267 | } | 267 | } |
268 | break; | 268 | break; |
269 | case ThrottleOutPacketType.Land: | 269 | case ThrottleOutPacketType.Land: |
270 | if (LandthrottleSentPeriod <= LandthrottleOutbound && LandOutgoingPacketQueue.Count == 0) | 270 | if (LandthrottleSentPeriod <= ((int)(LandthrottleOutbound / throttleTimeDivisor)) && LandOutgoingPacketQueue.Count == 0) |
271 | { | 271 | { |
272 | throttleSentPeriod += item.Packet.ToBytes().Length; | 272 | throttleSentPeriod += item.Packet.ToBytes().Length; |
273 | LandthrottleSentPeriod += item.Packet.ToBytes().Length; | 273 | LandthrottleSentPeriod += item.Packet.ToBytes().Length; |
@@ -279,7 +279,7 @@ namespace OpenSim.Region.ClientStack | |||
279 | } | 279 | } |
280 | break; | 280 | break; |
281 | case ThrottleOutPacketType.Asset: | 281 | case ThrottleOutPacketType.Asset: |
282 | if (AssetthrottleSentPeriod <= AssetthrottleOutbound && AssetOutgoingPacketQueue.Count == 0) | 282 | if (AssetthrottleSentPeriod <= ((int)(AssetthrottleOutbound / throttleTimeDivisor)) && AssetOutgoingPacketQueue.Count == 0) |
283 | { | 283 | { |
284 | throttleSentPeriod += item.Packet.ToBytes().Length; | 284 | throttleSentPeriod += item.Packet.ToBytes().Length; |
285 | AssetthrottleSentPeriod += item.Packet.ToBytes().Length; | 285 | AssetthrottleSentPeriod += item.Packet.ToBytes().Length; |
@@ -291,7 +291,7 @@ namespace OpenSim.Region.ClientStack | |||
291 | } | 291 | } |
292 | break; | 292 | break; |
293 | case ThrottleOutPacketType.Cloud: | 293 | case ThrottleOutPacketType.Cloud: |
294 | if (CloudthrottleSentPeriod <= CloudthrottleOutbound && CloudOutgoingPacketQueue.Count == 0) | 294 | if (CloudthrottleSentPeriod <= ((int)(CloudthrottleOutbound / throttleTimeDivisor)) && CloudOutgoingPacketQueue.Count == 0) |
295 | { | 295 | { |
296 | throttleSentPeriod += item.Packet.ToBytes().Length; | 296 | throttleSentPeriod += item.Packet.ToBytes().Length; |
297 | CloudthrottleSentPeriod += item.Packet.ToBytes().Length; | 297 | CloudthrottleSentPeriod += item.Packet.ToBytes().Length; |
@@ -303,7 +303,7 @@ namespace OpenSim.Region.ClientStack | |||
303 | } | 303 | } |
304 | break; | 304 | break; |
305 | case ThrottleOutPacketType.Wind: | 305 | case ThrottleOutPacketType.Wind: |
306 | if (WindthrottleSentPeriod <= WindthrottleOutbound && WindOutgoingPacketQueue.Count == 0) | 306 | if (WindthrottleSentPeriod <= ((int)(WindthrottleOutbound / throttleTimeDivisor)) && WindOutgoingPacketQueue.Count == 0) |
307 | { | 307 | { |
308 | throttleSentPeriod += item.Packet.ToBytes().Length; | 308 | throttleSentPeriod += item.Packet.ToBytes().Length; |
309 | WindthrottleSentPeriod += item.Packet.ToBytes().Length; | 309 | WindthrottleSentPeriod += item.Packet.ToBytes().Length; |
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index b4441ec..e6712fe 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -96,6 +96,9 @@ namespace OpenSim.Region.ClientStack | |||
96 | // TODO: Make this variable. Lower throttle on un-ack. Raise over time | 96 | // TODO: Make this variable. Lower throttle on un-ack. Raise over time |
97 | 97 | ||
98 | // All throttle times and number of bytes are calculated by dividing by this value | 98 | // All throttle times and number of bytes are calculated by dividing by this value |
99 | // This value also determines how many times per throttletimems the timer will run | ||
100 | // If throttleimems is 1000 ms, then the timer will fire every 1000/7 milliseconds | ||
101 | |||
99 | private int throttleTimeDivisor = 7; | 102 | private int throttleTimeDivisor = 7; |
100 | 103 | ||
101 | private int throttletimems = 1000; | 104 | private int throttletimems = 1000; |