aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-11-08 04:28:46 +0000
committerUbitUmarov2015-11-08 04:28:46 +0000
commit097c56330a410274410c87f4748156e08841c5cf (patch)
tree33ba1b303a9b4278b2b8988a83d3d1423c5c8d42 /OpenSim/Region/Framework/Scenes/Scene.cs
parent change maximum angular velocity to a value derived from heartbeat rate and N... (diff)
downloadopensim-SC_OLD-097c56330a410274410c87f4748156e08841c5cf.zip
opensim-SC_OLD-097c56330a410274410c87f4748156e08841c5cf.tar.gz
opensim-SC_OLD-097c56330a410274410c87f4748156e08841c5cf.tar.bz2
opensim-SC_OLD-097c56330a410274410c87f4748156e08841c5cf.tar.xz
rename MinFrameTime as FrameTime, since it is not a minimum but a target value; retune its value a bit so reported FPS is closer to integer value; change ode step size acording to reduce jitter in phys FPS; Make Statistics Scaling factor (fludge factor) configurable. (legacy default of 5.0 in code)
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs27
1 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index dddc31a..1952402 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -357,14 +357,13 @@ namespace OpenSim.Region.Framework.Scenes
357 public uint MaintenanceRun { get; private set; } 357 public uint MaintenanceRun { get; private set; }
358 358
359 /// <summary> 359 /// <summary>
360 /// The minimum length of time in seconds that will be taken for a scene frame. If the frame takes less time then we 360 /// Frame time
361 /// will sleep for the remaining period.
362 /// </summary>
363 /// <remarks>
364 /// One can tweak this number to experiment. One current effect of reducing it is to make avatar animations
365 /// occur too quickly (viewer 1) or with even more slide (viewer 2).
366 /// </remarks> 361 /// </remarks>
367 public float MinFrameTime { get; private set; } 362 public float FrameTime { get; private set; }
363
364 // statistics frame scale factor for viewer and scripts.
365 // see SimStatsReporter.cs
366 public float StatisticsFPSfactor { get; private set; }
368 367
369 /// <summary> 368 /// <summary>
370 /// The minimum length of time in seconds that will be taken for a scene frame. 369 /// The minimum length of time in seconds that will be taken for a scene frame.
@@ -860,7 +859,8 @@ namespace OpenSim.Region.Framework.Scenes
860 : this(regInfo) 859 : this(regInfo)
861 { 860 {
862 m_config = config; 861 m_config = config;
863 MinFrameTime = 0.089f; 862 FrameTime = 0.0908f;
863 StatisticsFPSfactor = 5.0f;
864 MinMaintenanceTime = 1; 864 MinMaintenanceTime = 1;
865 SeeIntoRegion = true; 865 SeeIntoRegion = true;
866 866
@@ -1100,7 +1100,8 @@ namespace OpenSim.Region.Framework.Scenes
1100 } 1100 }
1101 } 1101 }
1102 1102
1103 MinFrameTime = startupConfig.GetFloat( "MinFrameTime", MinFrameTime); 1103 FrameTime = startupConfig.GetFloat( "FrameTime", FrameTime);
1104 StatisticsFPSfactor = startupConfig.GetFloat( "StatisticsFPSfactor", StatisticsFPSfactor);
1104 1105
1105 m_update_backup = startupConfig.GetInt("UpdateStorageEveryNFrames", m_update_backup); 1106 m_update_backup = startupConfig.GetInt("UpdateStorageEveryNFrames", m_update_backup);
1106 m_update_coarse_locations = startupConfig.GetInt("UpdateCoarseLocationsEveryNFrames", m_update_coarse_locations); 1107 m_update_coarse_locations = startupConfig.GetInt("UpdateCoarseLocationsEveryNFrames", m_update_coarse_locations);
@@ -1729,7 +1730,7 @@ namespace OpenSim.Region.Framework.Scenes
1729 if (Frame % m_update_physics == 0) 1730 if (Frame % m_update_physics == 0)
1730 { 1731 {
1731 if (PhysicsEnabled) 1732 if (PhysicsEnabled)
1732 physicsFPS = m_sceneGraph.UpdatePhysics(MinFrameTime); 1733 physicsFPS = m_sceneGraph.UpdatePhysics(FrameTime);
1733 1734
1734 if (SynchronizeScene != null) 1735 if (SynchronizeScene != null)
1735 SynchronizeScene(this); 1736 SynchronizeScene(this);
@@ -1861,7 +1862,7 @@ namespace OpenSim.Region.Framework.Scenes
1861 1862
1862 // estimate sleep time 1863 // estimate sleep time
1863 tmpMS2 = tmpMS - framestart; 1864 tmpMS2 = tmpMS - framestart;
1864 tmpMS2 = (double)MinFrameTime * 1000.0D - tmpMS2; 1865 tmpMS2 = (double)FrameTime * 1000.0D - tmpMS2;
1865 1866
1866 m_firstHeartbeat = false; 1867 m_firstHeartbeat = false;
1867 1868
@@ -1882,12 +1883,12 @@ namespace OpenSim.Region.Framework.Scenes
1882 // Optionally warn if a frame takes double the amount of time that it should. 1883 // Optionally warn if a frame takes double the amount of time that it should.
1883 if (DebugUpdates 1884 if (DebugUpdates
1884 && Util.EnvironmentTickCountSubtract( 1885 && Util.EnvironmentTickCountSubtract(
1885 m_lastFrameTick, previousFrameTick) > (int)(MinFrameTime * 1000 * 2)) 1886 m_lastFrameTick, previousFrameTick) > (int)(FrameTime * 1000 * 2))
1886 1887
1887 m_log.WarnFormat( 1888 m_log.WarnFormat(
1888 "[SCENE]: Frame took {0} ms (desired max {1} ms) in {2}", 1889 "[SCENE]: Frame took {0} ms (desired max {1} ms) in {2}",
1889 Util.EnvironmentTickCountSubtract(m_lastFrameTick, previousFrameTick), 1890 Util.EnvironmentTickCountSubtract(m_lastFrameTick, previousFrameTick),
1890 MinFrameTime * 1000, 1891 FrameTime * 1000,
1891 1892
1892 RegionInfo.RegionName); 1893 RegionInfo.RegionName);
1893 } 1894 }