aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-01 18:12:28 +0100
committerJustin Clark-Casey (justincc)2013-08-01 18:12:28 +0100
commit0c4c084bed5175d8a5b25b8f915363f3b15b6e3a (patch)
tree715fa74d0ce34d4066e751e590369aec548a179d /OpenSim
parentRevert "Issue: painfully slow terrain loading. The cause is commit d9d995914c... (diff)
downloadopensim-SC-0c4c084bed5175d8a5b25b8f915363f3b15b6e3a.zip
opensim-SC-0c4c084bed5175d8a5b25b8f915363f3b15b6e3a.tar.gz
opensim-SC-0c4c084bed5175d8a5b25b8f915363f3b15b6e3a.tar.bz2
opensim-SC-0c4c084bed5175d8a5b25b8f915363f3b15b6e3a.tar.xz
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.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 85fe1a4..558fcb7 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1924,7 +1924,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1924 // 1924 //
1925 // Instead, now wait for data present to be explicitly signalled. Evidence so far is that with 1925 // Instead, now wait for data present to be explicitly signalled. Evidence so far is that with
1926 // modern mono it reduces CPU base load since there is no more continuous polling. 1926 // modern mono it reduces CPU base load since there is no more continuous polling.
1927 m_dataPresentEvent.WaitOne(100); 1927 if (!m_packetSent)
1928 m_dataPresentEvent.WaitOne(100);
1928 1929
1929 Watchdog.UpdateThread(); 1930 Watchdog.UpdateThread();
1930 } 1931 }