diff options
author | Justin Clark-Casey (justincc) | 2011-10-13 23:47:37 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-13 23:47:37 +0100 |
commit | 4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d (patch) | |
tree | d95daf64918aed46cb9723d7078ef45f026dd161 /OpenSim | |
parent | refactor: Put the frame update period when temporary objects are cleaned up i... (diff) | |
download | opensim-SC_OLD-4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d.zip opensim-SC_OLD-4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d.tar.gz opensim-SC_OLD-4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d.tar.bz2 opensim-SC_OLD-4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d.tar.xz |
Expose minimum frame time and update periods for experimentation.
Settings are at bottom of [Startup] in OpenSimDefaults.ini, override in OpenSim.ini to change
Defaults are the same as previously.
More information to come on opensim-dev shortly.
Feel free to tweak but if you do please don't expect any support unless feedback on certain tweaks is explicitly requested.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 225235a..f2b7014 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -162,17 +162,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
162 | /// </summary> | 162 | /// </summary> |
163 | protected DateTime m_lastFrameUpdate = DateTime.UtcNow; | 163 | protected DateTime m_lastFrameUpdate = DateTime.UtcNow; |
164 | 164 | ||
165 | // TODO: Possibly stop other classes being able to manipulate this directly. | ||
166 | private SceneGraph m_sceneGraph; | ||
167 | private volatile int m_bordersLocked; | ||
168 | // private int m_RestartTimerCounter; | ||
169 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing | ||
170 | // private int m_incrementsof15seconds; | ||
171 | private volatile bool m_backingup; | ||
172 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); | ||
173 | private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); | ||
174 | private Object m_heartbeatLock = new Object(); | ||
175 | |||
176 | private int m_update_physics = 1; | 165 | private int m_update_physics = 1; |
177 | private int m_update_entitymovement = 1; | 166 | private int m_update_entitymovement = 1; |
178 | private int m_update_objects = 1; | 167 | private int m_update_objects = 1; |
@@ -196,6 +185,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
196 | private int landMS; | 185 | private int landMS; |
197 | private int lastCompletedFrame; | 186 | private int lastCompletedFrame; |
198 | 187 | ||
188 | /// <summary> | ||
189 | /// Signals whether temporary objects are currently being cleaned up. Needed because this is launched | ||
190 | /// asynchronously from the update loop. | ||
191 | /// </summary> | ||
192 | private bool m_cleaningTemps = false; | ||
193 | |||
194 | private Object m_heartbeatLock = new Object(); | ||
195 | |||
196 | // TODO: Possibly stop other classes being able to manipulate this directly. | ||
197 | private SceneGraph m_sceneGraph; | ||
198 | private volatile int m_bordersLocked; | ||
199 | // private int m_RestartTimerCounter; | ||
200 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing | ||
201 | // private int m_incrementsof15seconds; | ||
202 | private volatile bool m_backingup; | ||
203 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); | ||
204 | private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); | ||
205 | |||
199 | private bool m_physics_enabled = true; | 206 | private bool m_physics_enabled = true; |
200 | private bool m_scripts_enabled = true; | 207 | private bool m_scripts_enabled = true; |
201 | private string m_defaultScriptEngine; | 208 | private string m_defaultScriptEngine; |
@@ -207,8 +214,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
207 | private bool m_firstHeartbeat = true; | 214 | private bool m_firstHeartbeat = true; |
208 | 215 | ||
209 | private object m_deleting_scene_object = new object(); | 216 | private object m_deleting_scene_object = new object(); |
210 | |||
211 | private bool m_cleaningTemps = false; | ||
212 | 217 | ||
213 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; | 218 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; |
214 | private bool m_reprioritizationEnabled = true; | 219 | private bool m_reprioritizationEnabled = true; |
@@ -220,8 +225,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
220 | private bool m_generateMaptiles; | 225 | private bool m_generateMaptiles; |
221 | private bool m_useBackup = true; | 226 | private bool m_useBackup = true; |
222 | 227 | ||
223 | // private Dictionary<UUID, string[]> m_UserNamesCache = new Dictionary<UUID, string[]>(); | ||
224 | |||
225 | #endregion Fields | 228 | #endregion Fields |
226 | 229 | ||
227 | #region Properties | 230 | #region Properties |
@@ -645,10 +648,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
645 | 648 | ||
646 | m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics; | 649 | m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics; |
647 | 650 | ||
648 | StatsReporter = new SimStatsReporter(this); | ||
649 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | ||
650 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | ||
651 | |||
652 | // Old | 651 | // Old |
653 | /* | 652 | /* |
654 | m_simulatorVersion = simulatorVersion | 653 | m_simulatorVersion = simulatorVersion |
@@ -741,6 +740,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
741 | RegionInfo.RegionSettings.TerrainImageID = tileID; | 740 | RegionInfo.RegionSettings.TerrainImageID = tileID; |
742 | } | 741 | } |
743 | } | 742 | } |
743 | |||
744 | MinFrameTime = startupConfig.GetFloat( "MinFrameTime", MinFrameTime); | ||
745 | m_update_backup = startupConfig.GetInt( "UpdateStorageEveryNFrames", m_update_backup); | ||
746 | m_update_coarse_locations = startupConfig.GetInt( "UpdateCoarseLocationsEveryNFrames", m_update_coarse_locations); | ||
747 | m_update_entitymovement = startupConfig.GetInt( "UpdateEntityMovementEveryNFrames", m_update_entitymovement); | ||
748 | m_update_events = startupConfig.GetInt( "UpdateEventsEveryNFrames", m_update_events); | ||
749 | m_update_objects = startupConfig.GetInt( "UpdateObjectsEveryNFrames", m_update_objects); | ||
750 | m_update_physics = startupConfig.GetInt( "UpdatePhysicsEveryNFrames", m_update_physics); | ||
751 | m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences); | ||
752 | m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain); | ||
753 | m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning); | ||
744 | } | 754 | } |
745 | catch | 755 | catch |
746 | { | 756 | { |
@@ -778,6 +788,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
778 | m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme"); | 788 | m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme"); |
779 | 789 | ||
780 | #endregion Interest Management | 790 | #endregion Interest Management |
791 | |||
792 | StatsReporter = new SimStatsReporter(this); | ||
793 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | ||
794 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | ||
781 | } | 795 | } |
782 | 796 | ||
783 | /// <summary> | 797 | /// <summary> |