From e3262ef5ace4be920edfa0dd4e4f23fc20b07b70 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 14 Dec 2010 17:50:37 -0800 Subject: Commented out the UpdateLand call from the Update thread loop, because this may be causing the #LoginLag. Attachments taint the prim count. Twice. Each. --- OpenSim/Region/Framework/Scenes/Scene.cs | 12 ++++++------ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index de75375..73a0803 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1302,12 +1302,12 @@ namespace OpenSim.Region.Framework.Scenes terrainMS = Util.EnvironmentTickCountSubtract(terMS); } - if (m_frame % m_update_land == 0) - { - int ldMS = Util.EnvironmentTickCount(); - UpdateLand(); - landMS = Util.EnvironmentTickCountSubtract(ldMS); - } + //if (m_frame % m_update_land == 0) + //{ + // int ldMS = Util.EnvironmentTickCount(); + // UpdateLand(); + // landMS = Util.EnvironmentTickCountSubtract(ldMS); + //} frameMS = Util.EnvironmentTickCountSubtract(tmpFrameMS); otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS; diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 62d7011..432ce46 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2314,6 +2314,7 @@ namespace OpenSim.Region.Framework.Scenes // followed suggestion from mic bowman. reversed the two lines below. if (m_parentID == 0 && m_physicsActor != null || m_parentID != 0) // Check that we have a physics actor or we're sitting on something CheckForBorderCrossing(); + CheckForSignificantMovement(); // sends update to the modules. } } -- cgit v1.1 From 74c68474e01eedc6cc4c9ef26386939c1d693172 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 14 Dec 2010 18:44:26 -0800 Subject: Another attempt at moving heavy computation away from the Update loop. #LoginLag --- OpenSim/Region/Framework/Scenes/Scene.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 73a0803..52e2e5d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -176,6 +176,8 @@ namespace OpenSim.Region.Framework.Scenes private object m_deleting_scene_object = new object(); private object m_cleaningAttachments = new object(); + private bool m_cleaningTemps = false; + private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; private bool m_reprioritizationEnabled = true; private double m_reprioritizationInterval = 5000.0; @@ -1272,10 +1274,11 @@ namespace OpenSim.Region.Framework.Scenes physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS); // Delete temp-on-rez stuff - if (m_frame % m_update_backup == 0) + if (m_frame % m_update_backup == 0 && !m_cleaningTemps) { int tmpTempOnRezMS = Util.EnvironmentTickCount(); - CleanTempObjects(); + m_cleaningTemps = true; + Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; }); tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpTempOnRezMS); } @@ -4391,6 +4394,7 @@ namespace OpenSim.Region.Framework.Scenes } } } + } public void DeleteFromStorage(UUID uuid) -- cgit v1.1 From ed26376ec5377050dd2cf0b17f41009834638875 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 14 Dec 2010 20:15:26 -0800 Subject: 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. --- OpenSim/Region/Framework/Scenes/Scene.cs | 15 +++++++-------- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 ++++- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') 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 private int m_update_backup = 200; private int m_update_terrain = 50; private int m_update_land = 1; - private int m_update_coarse_locations = 50; + private int m_update_coarse_locations = 80; private int frameMS; private int physicsMS2; @@ -1274,7 +1274,7 @@ namespace OpenSim.Region.Framework.Scenes physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS); // Delete temp-on-rez stuff - if (m_frame % m_update_backup == 0 && !m_cleaningTemps) + if (m_frame % 1000 == 0 && !m_cleaningTemps) { int tmpTempOnRezMS = Util.EnvironmentTickCount(); m_cleaningTemps = true; @@ -1400,13 +1400,12 @@ namespace OpenSim.Region.Framework.Scenes private void CheckAtTargets() { + Dictionary.ValueCollection objs; lock (m_groupsWithTargets) - { - foreach (SceneObjectGroup entry in m_groupsWithTargets.Values) - { - entry.checkAtTargets(); - } - } + objs = m_groupsWithTargets.Values; + + foreach (SceneObjectGroup entry in objs) + entry.checkAtTargets(); } 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 #region Overridden Methods + private bool sendingPrims = false; + public override void Update() { const float ROTATION_TOLERANCE = 0.01f; @@ -2286,7 +2288,8 @@ namespace OpenSim.Region.Framework.Scenes const float POSITION_TOLERANCE = 0.05f; //const int TIME_MS_TOLERANCE = 3000; - SendPrimUpdates(); + if (!sendingPrims) + Util.FireAndForget(delegate { sendingPrims = true; SendPrimUpdates(); sendingPrims = false; }); if (m_isChildAgent == false) { -- cgit v1.1