aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-07-18 21:28:36 +0100
committerDiva Canto2013-07-21 08:56:48 -0700
commit63c42d66022ea7f1c2805b8f77980af5d4ba1fb4 (patch)
tree48bbe3212636cc81f525ba0d4c6ae56ad27b3551 /OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-63c42d66022ea7f1c2805b8f77980af5d4ba1fb4.zip
opensim-SC_OLD-63c42d66022ea7f1c2805b8f77980af5d4ba1fb4.tar.gz
opensim-SC_OLD-63c42d66022ea7f1c2805b8f77980af5d4ba1fb4.tar.bz2
opensim-SC_OLD-63c42d66022ea7f1c2805b8f77980af5d4ba1fb4.tar.xz
Do some simple queue empty checks in the main outgoing udp loop instead of always performing these on a separate fired thread.
This appears to improve cpu usage since launching a new thread is more expensive than performing a small amount of inline logic. However, needs testing at scale.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
index 073c357..41dd4d1 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
@@ -206,6 +206,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
206 } 206 }
207 } 207 }
208 208
209 public bool HasUpdates()
210 {
211 J2KImage image = GetHighestPriorityImage();
212
213 return image != null && image.IsDecoded;
214 }
215
209 public bool ProcessImageQueue(int packetsToSend) 216 public bool ProcessImageQueue(int packetsToSend)
210 { 217 {
211 int packetsSent = 0; 218 int packetsSent = 0;