diff options
author | Justin Clark-Casey (justincc) | 2014-09-26 20:05:22 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-11-25 23:18:38 +0000 |
commit | 7bababaab64ccac7153f68c19a3988764d537b1e (patch) | |
tree | 3ed7b2db238fd605a2673aef2bdad57376705888 /OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |
parent | Make BulletSim thread be ThreadPriority.Highest if running (diff) | |
download | opensim-SC-7bababaab64ccac7153f68c19a3988764d537b1e.zip opensim-SC-7bababaab64ccac7153f68c19a3988764d537b1e.tar.gz opensim-SC-7bababaab64ccac7153f68c19a3988764d537b1e.tar.bz2 opensim-SC-7bababaab64ccac7153f68c19a3988764d537b1e.tar.xz |
Improve frame time stability by taking a few unnecessary repeated calculations out of the main scene loop.
Also uses a wait event to sleep rather than a Thread.Sleep to allow the loop to be interrupted in a more controlled manner when necessary.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SimStatsReporter.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 95f9caf..8f1e345 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |||
@@ -224,7 +224,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
224 | public SimStatsReporter(Scene scene) | 224 | public SimStatsReporter(Scene scene) |
225 | { | 225 | { |
226 | m_scene = scene; | 226 | m_scene = scene; |
227 | m_reportedFpsCorrectionFactor = scene.MinFrameTime * m_nominalReportedFps; | 227 | m_reportedFpsCorrectionFactor = scene.MinFrameSeconds * m_nominalReportedFps; |
228 | m_statsUpdateFactor = (float)(m_statsUpdatesEveryMS / 1000); | 228 | m_statsUpdateFactor = (float)(m_statsUpdatesEveryMS / 1000); |
229 | ReportingRegion = scene.RegionInfo; | 229 | ReportingRegion = scene.RegionInfo; |
230 | 230 | ||
@@ -239,7 +239,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
239 | 239 | ||
240 | /// At the moment, we'll only report if a frame is over 120% of target, since commonly frames are a bit | 240 | /// At the moment, we'll only report if a frame is over 120% of target, since commonly frames are a bit |
241 | /// longer than ideal (which in itself is a concern). | 241 | /// longer than ideal (which in itself is a concern). |
242 | SlowFramesStatReportThreshold = (int)Math.Ceiling(m_scene.MinFrameTime * 1000 * 1.2); | 242 | SlowFramesStatReportThreshold = (int)Math.Ceiling(scene.MinFrameTicks * 1.2); |
243 | 243 | ||
244 | SlowFramesStat | 244 | SlowFramesStat |
245 | = new Stat( | 245 | = new Stat( |