aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-15 16:35:27 -0700
committerJohn Hurliman2009-10-15 16:35:27 -0700
commit4b75353cbf50de3cae4c48ec90b55f30c1612c92 (patch)
tree2b5bf30d2a0c8558437f757e28081cb60a8b5dfc /OpenSim/Region/Framework/Scenes/Scene.cs
parentReplaced the update lists with a priority queue implementation in LLClientView (diff)
downloadopensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.zip
opensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.tar.gz
opensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.tar.bz2
opensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.tar.xz
Object update prioritization by Jim Greensky of Intel Labs, part one. This implements a simple distance prioritizer based on initial agent positions. Re-prioritizing and more advanced priority algorithms will follow soon
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs40
1 files changed, 32 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d13d4fb..c7efc19 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -57,6 +57,12 @@ namespace OpenSim.Region.Framework.Scenes
57 57
58 public partial class Scene : SceneBase 58 public partial class Scene : SceneBase
59 { 59 {
60 public enum UpdatePrioritizationSchemes {
61 Time = 0,
62 Distance = 1,
63 SimpleAngularDistance = 2,
64 }
65
60 public delegate void SynchronizeSceneHandler(Scene scene); 66 public delegate void SynchronizeSceneHandler(Scene scene);
61 public SynchronizeSceneHandler SynchronizeScene = null; 67 public SynchronizeSceneHandler SynchronizeScene = null;
62 68
@@ -268,9 +274,10 @@ namespace OpenSim.Region.Framework.Scenes
268 private volatile bool shuttingdown = false; 274 private volatile bool shuttingdown = false;
269 275
270 private int m_lastUpdate = Environment.TickCount; 276 private int m_lastUpdate = Environment.TickCount;
271 private int m_maxPrimsPerFrame = 200;
272 private bool m_firstHeartbeat = true; 277 private bool m_firstHeartbeat = true;
273 278
279 private UpdatePrioritizationSchemes m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time;
280
274 private object m_deleting_scene_object = new object(); 281 private object m_deleting_scene_object = new object();
275 282
276 // the minimum time that must elapse before a changed object will be considered for persisted 283 // the minimum time that must elapse before a changed object will be considered for persisted
@@ -282,6 +289,8 @@ namespace OpenSim.Region.Framework.Scenes
282 289
283 #region Properties 290 #region Properties
284 291
292 public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return this.m_update_prioritization_scheme; } }
293
285 public AgentCircuitManager AuthenticateHandler 294 public AgentCircuitManager AuthenticateHandler
286 { 295 {
287 get { return m_authenticateHandler; } 296 get { return m_authenticateHandler; }
@@ -326,12 +335,6 @@ namespace OpenSim.Region.Framework.Scenes
326 get { return m_sceneGraph.m_syncRoot; } 335 get { return m_sceneGraph.m_syncRoot; }
327 } 336 }
328 337
329 public int MaxPrimsPerFrame
330 {
331 get { return m_maxPrimsPerFrame; }
332 set { m_maxPrimsPerFrame = value; }
333 }
334
335 /// <summary> 338 /// <summary>
336 /// This is for llGetRegionFPS 339 /// This is for llGetRegionFPS
337 /// </summary> 340 /// </summary>
@@ -509,7 +512,6 @@ namespace OpenSim.Region.Framework.Scenes
509 512
510 m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "DotNetEngine"); 513 m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "DotNetEngine");
511 514
512 m_maxPrimsPerFrame = startupConfig.GetInt("MaxPrimsPerFrame", 200);
513 IConfig packetConfig = m_config.Configs["PacketPool"]; 515 IConfig packetConfig = m_config.Configs["PacketPool"];
514 if (packetConfig != null) 516 if (packetConfig != null)
515 { 517 {
@@ -518,6 +520,28 @@ namespace OpenSim.Region.Framework.Scenes
518 } 520 }
519 521
520 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); 522 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
523
524 IConfig interest_management_config = m_config.Configs["InterestManagement"];
525 if (interest_management_config != null)
526 {
527 string update_prioritization_scheme = interest_management_config.GetString("UpdatePrioritizationScheme", "Time").Trim().ToLower();
528 switch (update_prioritization_scheme)
529 {
530 case "time":
531 m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time;
532 break;
533 case "distance":
534 m_update_prioritization_scheme = UpdatePrioritizationSchemes.Distance;
535 break;
536 case "simpleangulardistance":
537 m_update_prioritization_scheme = UpdatePrioritizationSchemes.SimpleAngularDistance;
538 break;
539 default:
540 m_log.Warn("[SCENE]: UpdatePrioritizationScheme was not recognized, setting to default settomg of Time");
541 m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time;
542 break;
543 }
544 }
521 } 545 }
522 catch 546 catch
523 { 547 {