aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2010-12-14 20:15:26 -0800
committerDiva Canto2010-12-14 20:15:26 -0800
commited26376ec5377050dd2cf0b17f41009834638875 (patch)
tree2908d12ad1e8e831c02fafefe9a6ff3c7d4db72f /OpenSim
parentAnother attempt at moving heavy computation away from the Update loop. #LoginLag (diff)
downloadopensim-SC-ed26376ec5377050dd2cf0b17f41009834638875.zip
opensim-SC-ed26376ec5377050dd2cf0b17f41009834638875.tar.gz
opensim-SC-ed26376ec5377050dd2cf0b17f41009834638875.tar.bz2
opensim-SC-ed26376ec5377050dd2cf0b17f41009834638875.tar.xz
Yet more things out of the main Update thread loop and into threadlets. This time, SendPrimsUpdate. Plus a few more tweaks on triggering actions from the Update loop. #LoginLag.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs15
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs5
2 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 52e2e5d..50efe65 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -150,7 +150,7 @@ namespace OpenSim.Region.Framework.Scenes
150 private int m_update_backup = 200; 150 private int m_update_backup = 200;
151 private int m_update_terrain = 50; 151 private int m_update_terrain = 50;
152 private int m_update_land = 1; 152 private int m_update_land = 1;
153 private int m_update_coarse_locations = 50; 153 private int m_update_coarse_locations = 80;
154 154
155 private int frameMS; 155 private int frameMS;
156 private int physicsMS2; 156 private int physicsMS2;
@@ -1274,7 +1274,7 @@ namespace OpenSim.Region.Framework.Scenes
1274 physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS); 1274 physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS);
1275 1275
1276 // Delete temp-on-rez stuff 1276 // Delete temp-on-rez stuff
1277 if (m_frame % m_update_backup == 0 && !m_cleaningTemps) 1277 if (m_frame % 1000 == 0 && !m_cleaningTemps)
1278 { 1278 {
1279 int tmpTempOnRezMS = Util.EnvironmentTickCount(); 1279 int tmpTempOnRezMS = Util.EnvironmentTickCount();
1280 m_cleaningTemps = true; 1280 m_cleaningTemps = true;
@@ -1400,13 +1400,12 @@ namespace OpenSim.Region.Framework.Scenes
1400 1400
1401 private void CheckAtTargets() 1401 private void CheckAtTargets()
1402 { 1402 {
1403 Dictionary<UUID, SceneObjectGroup>.ValueCollection objs;
1403 lock (m_groupsWithTargets) 1404 lock (m_groupsWithTargets)
1404 { 1405 objs = m_groupsWithTargets.Values;
1405 foreach (SceneObjectGroup entry in m_groupsWithTargets.Values) 1406
1406 { 1407 foreach (SceneObjectGroup entry in objs)
1407 entry.checkAtTargets(); 1408 entry.checkAtTargets();
1408 }
1409 }
1410 } 1409 }
1411 1410
1412 1411
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 432ce46..9d72bf6 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2279,6 +2279,8 @@ namespace OpenSim.Region.Framework.Scenes
2279 2279
2280 #region Overridden Methods 2280 #region Overridden Methods
2281 2281
2282 private bool sendingPrims = false;
2283
2282 public override void Update() 2284 public override void Update()
2283 { 2285 {
2284 const float ROTATION_TOLERANCE = 0.01f; 2286 const float ROTATION_TOLERANCE = 0.01f;
@@ -2286,7 +2288,8 @@ namespace OpenSim.Region.Framework.Scenes
2286 const float POSITION_TOLERANCE = 0.05f; 2288 const float POSITION_TOLERANCE = 0.05f;
2287 //const int TIME_MS_TOLERANCE = 3000; 2289 //const int TIME_MS_TOLERANCE = 3000;
2288 2290
2289 SendPrimUpdates(); 2291 if (!sendingPrims)
2292 Util.FireAndForget(delegate { sendingPrims = true; SendPrimUpdates(); sendingPrims = false; });
2290 2293
2291 if (m_isChildAgent == false) 2294 if (m_isChildAgent == false)
2292 { 2295 {