aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-09-27 00:23:52 +0100
committerJustin Clark-Casey (justincc)2014-09-27 00:23:52 +0100
commit530b0cbbf1e8f40fcc06b7c6d7011392c5356a9b (patch)
tree87b5662aa65540e0b800ffa225d36c0a69587835 /OpenSim/Region/Framework
parentFix recent regression with llRegionSayTo() started sending messages twice. (diff)
downloadopensim-SC_OLD-530b0cbbf1e8f40fcc06b7c6d7011392c5356a9b.zip
opensim-SC_OLD-530b0cbbf1e8f40fcc06b7c6d7011392c5356a9b.tar.gz
opensim-SC_OLD-530b0cbbf1e8f40fcc06b7c6d7011392c5356a9b.tar.bz2
opensim-SC_OLD-530b0cbbf1e8f40fcc06b7c6d7011392c5356a9b.tar.xz
Move expired objects cleaning trigger to the maintenance thread of a region rather than it's main scene loop.
[Startup] default setting UpdateTempCleaningEveryNFrames becomes UpdateTempCleaningEveryNSeconds. Default becomes 180s instead of effective 182s (which would also vary with any changes in frame time or extra long frames)
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs43
1 files changed, 23 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index eb2d6f0..a0b2123 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -377,13 +377,13 @@ namespace OpenSim.Region.Framework.Scenes
377 private int m_update_physics = 1; 377 private int m_update_physics = 1;
378 private int m_update_entitymovement = 1; 378 private int m_update_entitymovement = 1;
379 private int m_update_objects = 1; 379 private int m_update_objects = 1;
380 private int m_update_temp_cleaning = 1000;
381 private int m_update_presences = 1; // Update scene presence movements 380 private int m_update_presences = 1; // Update scene presence movements
382 private int m_update_events = 1; 381 private int m_update_events = 1;
383 private int m_update_backup = 200; 382 private int m_update_backup = 200;
384 private int m_update_terrain = 50; 383 private int m_update_terrain = 50;
385// private int m_update_land = 1; 384// private int m_update_land = 1;
386 private int m_update_coarse_locations = 50; 385 private int m_update_coarse_locations = 50;
386 private int m_update_temp_cleaning = 180;
387 387
388 private int agentMS; 388 private int agentMS;
389 private int frameMS; 389 private int frameMS;
@@ -1014,7 +1014,7 @@ namespace OpenSim.Region.Framework.Scenes
1014 m_update_physics = startupConfig.GetInt( "UpdatePhysicsEveryNFrames", m_update_physics); 1014 m_update_physics = startupConfig.GetInt( "UpdatePhysicsEveryNFrames", m_update_physics);
1015 m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences); 1015 m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences);
1016 m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain); 1016 m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain);
1017 m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning); 1017 m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNSeconds", m_update_temp_cleaning);
1018 } 1018 }
1019 1019
1020 // FIXME: Ultimately this should be in a module. 1020 // FIXME: Ultimately this should be in a module.
@@ -1491,7 +1491,7 @@ namespace OpenSim.Region.Framework.Scenes
1491 public void DoMaintenance(int runs) 1491 public void DoMaintenance(int runs)
1492 { 1492 {
1493 long? endRun = null; 1493 long? endRun = null;
1494 int runtc; 1494 int runtc, tmpMS;
1495 int previousMaintenanceTick; 1495 int previousMaintenanceTick;
1496 1496
1497 if (runs >= 0) 1497 if (runs >= 0)
@@ -1505,6 +1505,8 @@ namespace OpenSim.Region.Framework.Scenes
1505 runtc = Util.EnvironmentTickCount(); 1505 runtc = Util.EnvironmentTickCount();
1506 ++MaintenanceRun; 1506 ++MaintenanceRun;
1507 1507
1508// m_log.DebugFormat("[SCENE]: Maintenance run {0} in {1}", MaintenanceRun, Name);
1509
1508 // Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client) 1510 // Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client)
1509 if (MaintenanceRun % (m_update_coarse_locations / 10) == 0) 1511 if (MaintenanceRun % (m_update_coarse_locations / 10) == 0)
1510 { 1512 {
@@ -1526,6 +1528,21 @@ namespace OpenSim.Region.Framework.Scenes
1526 } 1528 }
1527 } 1529 }
1528 1530
1531 // Delete temp-on-rez stuff
1532 if (MaintenanceRun % m_update_temp_cleaning == 0 && !m_cleaningTemps)
1533 {
1534// m_log.DebugFormat("[SCENE]: Running temp-on-rez cleaning in {0}", Name);
1535 tmpMS = Util.EnvironmentTickCount();
1536 m_cleaningTemps = true;
1537
1538 Watchdog.RunInThread(
1539 delegate { CleanTempObjects(); m_cleaningTemps = false; },
1540 string.Format("CleanTempObjects ({0})", Name),
1541 null);
1542
1543 tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpMS);
1544 }
1545
1529 Watchdog.UpdateThread(); 1546 Watchdog.UpdateThread();
1530 1547
1531 previousMaintenanceTick = m_lastMaintenanceTick; 1548 previousMaintenanceTick = m_lastMaintenanceTick;
@@ -1564,7 +1581,7 @@ namespace OpenSim.Region.Framework.Scenes
1564 1581
1565// m_log.DebugFormat("[SCENE]: Processing frame {0} in {1}", Frame, RegionInfo.RegionName); 1582// m_log.DebugFormat("[SCENE]: Processing frame {0} in {1}", Frame, RegionInfo.RegionName);
1566 1583
1567 agentMS = tempOnRezMS = eventMS = backupMS = terrainMS = landMS = spareMS = 0; 1584 agentMS = eventMS = backupMS = terrainMS = landMS = spareMS = 0;
1568 1585
1569 try 1586 try
1570 { 1587 {
@@ -1617,21 +1634,7 @@ namespace OpenSim.Region.Framework.Scenes
1617 if (Frame % m_update_presences == 0) 1634 if (Frame % m_update_presences == 0)
1618 m_sceneGraph.UpdatePresences(); 1635 m_sceneGraph.UpdatePresences();
1619 1636
1620 agentMS += Util.EnvironmentTickCountSubtract(tmpMS); 1637 agentMS += Util.EnvironmentTickCountSubtract(tmpMS);
1621
1622 // Delete temp-on-rez stuff
1623 if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps)
1624 {
1625 tmpMS = Util.EnvironmentTickCount();
1626 m_cleaningTemps = true;
1627
1628 Watchdog.RunInThread(
1629 delegate { CleanTempObjects(); m_cleaningTemps = false; },
1630 string.Format("CleanTempObjects ({0})", Name),
1631 null);
1632
1633 tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpMS);
1634 }
1635 1638
1636 if (Frame % m_update_events == 0) 1639 if (Frame % m_update_events == 0)
1637 { 1640 {
@@ -1701,7 +1704,7 @@ namespace OpenSim.Region.Framework.Scenes
1701 } 1704 }
1702 1705
1703 EventManager.TriggerRegionHeartbeatEnd(this); 1706 EventManager.TriggerRegionHeartbeatEnd(this);
1704 otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS; 1707 otherMS = eventMS + backupMS + terrainMS + landMS;
1705 1708
1706 if (!UpdateOnTimer) 1709 if (!UpdateOnTimer)
1707 { 1710 {