mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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.
This commit is contained in:
@@ -1924,7 +1924,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
//
|
||||
// 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.
|
||||
m_dataPresentEvent.WaitOne(100);
|
||||
if (!m_packetSent)
|
||||
m_dataPresentEvent.WaitOne(100);
|
||||
|
||||
Watchdog.UpdateThread();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user