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.

viewer-2-initial-appearance
Diva Canto 2010-12-14 20:15:26 -08:00
parent 74c68474e0
commit ed26376ec5
2 changed files with 11 additions and 9 deletions

View File

@ -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<UUID, SceneObjectGroup>.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();
}

View File

@ -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)
{