aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs43
-rw-r--r--bin/OpenSimDefaults.ini8
2 files changed, 27 insertions, 24 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 {
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index c6250e5..54f3da6 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -180,10 +180,6 @@
180 ; This must be a whole number 180 ; This must be a whole number
181 UpdatePhysicsEveryNFrames = 1; 181 UpdatePhysicsEveryNFrames = 1;
182 182
183 ; Clean up temp on rez objects.
184 ; This must be a whole number
185 UpdateTempCleaningEveryNFrames = 1000;
186
187 ; Send out the on frame event to modules and other listeners. This should probably never deviate from 1. 183 ; Send out the on frame event to modules and other listeners. This should probably never deviate from 1.
188 ; This must be a whole number 184 ; This must be a whole number
189 UpdateEventsEveryNFrames = 1; 185 UpdateEventsEveryNFrames = 1;
@@ -196,6 +192,10 @@
196 ; This must be a whole number 192 ; This must be a whole number
197 UpdateStorageEveryNFrames = 200; 193 UpdateStorageEveryNFrames = 200;
198 194
195 ; Clean up temp on rez objects.
196 ; This must be a whole number
197 UpdateTempCleaningEveryNSeconds = 180;
198
199 ; ## 199 ; ##
200 ; ## PRIM STORAGE 200 ; ## PRIM STORAGE
201 ; ## 201 ; ##