diff options
author | Justin Clark-Casey (justincc) | 2013-07-18 21:28:36 +0100 |
---|---|---|
committer | Diva Canto | 2013-07-21 08:56:48 -0700 |
commit | 63c42d66022ea7f1c2805b8f77980af5d4ba1fb4 (patch) | |
tree | 48bbe3212636cc81f525ba0d4c6ae56ad27b3551 /OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-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.cs | 7 |
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; |