Revert "Issue: painfully slow terrain loading. The cause is commit d9d995914c (r/23185) -- the WaitOne on the UDPServer. Putting it back to how it was done solves the issue. But this may impact CPU usage, so I'm pushing it to test if it does."

This reverts commit 59b461ac0e.
TeleportWork
Justin Clark-Casey (justincc) 2013-08-01 18:11:50 +01:00
parent 59b461ac0e
commit 932c382737
1 changed files with 5 additions and 5 deletions

View File

@ -246,7 +246,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// This allows the outbound loop to only operate when there is data to send rather than continuously polling. /// This allows the outbound loop to only operate when there is data to send rather than continuously polling.
/// Some data is sent immediately and not queued. That data would not trigger this event. /// Some data is sent immediately and not queued. That data would not trigger this event.
/// </remarks> /// </remarks>
//private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false);
private Pool<IncomingPacket> m_incomingPacketPool; private Pool<IncomingPacket> m_incomingPacketPool;
@ -907,7 +907,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
PacketPool.Instance.ReturnPacket(packet); PacketPool.Instance.ReturnPacket(packet);
//m_dataPresentEvent.Set(); m_dataPresentEvent.Set();
} }
/// <summary> /// <summary>
@ -1919,12 +1919,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// If nothing was sent, sleep for the minimum amount of time before a // If nothing was sent, sleep for the minimum amount of time before a
// token bucket could get more tokens // token bucket could get more tokens
if (!m_packetSent) //if (!m_packetSent)
Thread.Sleep((int)TickCountResolution); // Thread.Sleep((int)TickCountResolution);
// //
// 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.
//m_dataPresentEvent.WaitOne(100); m_dataPresentEvent.WaitOne(100);
Watchdog.UpdateThread(); Watchdog.UpdateThread();
} }