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.
This commit is contained in:
Justin Clark-Casey (justincc)
2013-07-18 21:28:36 +01:00
committed by Diva Canto
parent 9041f4a056
commit 63c42d6602
5 changed files with 92 additions and 22 deletions

View File

@@ -206,6 +206,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
public bool HasUpdates()
{
J2KImage image = GetHighestPriorityImage();
return image != null && image.IsDecoded;
}
public bool ProcessImageQueue(int packetsToSend)
{
int packetsSent = 0;