Try a different approach to slow terrain update by always cycling the loop immediately if any data was sent, rather than waiting.

What I believe is happening is that on initial terrain send, this is done one packet at a time.
With WaitOne, the outbound loop has enough time to loop and wait again after the first packet before the second, leading to a slower send.
This approach instead does not wait if a packet was just sent but instead loops again, which appears to lead to a quicker send without losing the cpu benefit of not continually looping when there is no outbound data.
TeleportWork
Justin Clark-Casey (justincc) 2013-08-01 18:12:28 +01:00
parent 932c382737
commit 0c4c084bed
1 changed files with 2 additions and 1 deletions

View File

@ -1924,6 +1924,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// //
// Instead, now wait for data present to be explicitly signalled. Evidence so far is that with // Instead, now wait for data present to be explicitly signalled. Evidence so far is that with
// modern mono it reduces CPU base load since there is no more continuous polling. // modern mono it reduces CPU base load since there is no more continuous polling.
if (!m_packetSent)
m_dataPresentEvent.WaitOne(100); m_dataPresentEvent.WaitOne(100);
Watchdog.UpdateThread(); Watchdog.UpdateThread();