From 59b461ac0eaae1cc34bb82431106fdf0476037f3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 1 Aug 2013 09:27:44 -0700 Subject: Issue: painfully slow terrain loading. The cause is commit d9d995914c5fba00d4ccaf66b899384c8ea3d5eb (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. --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 85fe1a4..942c044 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -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. /// Some data is sent immediately and not queued. That data would not trigger this event. /// - private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); + //private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); private Pool m_incomingPacketPool; @@ -907,7 +907,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP PacketPool.Instance.ReturnPacket(packet); - m_dataPresentEvent.Set(); + //m_dataPresentEvent.Set(); } /// @@ -1919,12 +1919,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP // If nothing was sent, sleep for the minimum amount of time before a // token bucket could get more tokens - //if (!m_packetSent) - // Thread.Sleep((int)TickCountResolution); + if (!m_packetSent) + Thread.Sleep((int)TickCountResolution); // // 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); + //m_dataPresentEvent.WaitOne(100); Watchdog.UpdateThread(); } -- cgit v1.1