aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-09-09 18:26:41 +0100
committerJustin Clark-Casey (justincc)2014-11-25 23:18:38 +0000
commit9fb3065d336d1907b5946c30010c9066e99e7597 (patch)
tree035375916086a344e99a3e2a6fbfeb9fa19421c2
parentAdd experimental job engine to see if queueing some existing async work durin... (diff)
downloadopensim-SC_OLD-9fb3065d336d1907b5946c30010c9066e99e7597.zip
opensim-SC_OLD-9fb3065d336d1907b5946c30010c9066e99e7597.tar.gz
opensim-SC_OLD-9fb3065d336d1907b5946c30010c9066e99e7597.tar.bz2
opensim-SC_OLD-9fb3065d336d1907b5946c30010c9066e99e7597.tar.xz
Temporarily add root agent rez attachments work to job engine if it is running rather than as a fire and forget.
Experiment to see if serializing attachment rez and send initial data jobs improves other parts of sim performance.
-rw-r--r--OpenSim/Framework/Monitoring/Watchdog.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs12
2 files changed, 12 insertions, 8 deletions
diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs
index b00aa5c..ebbf095 100644
--- a/OpenSim/Framework/Monitoring/Watchdog.cs
+++ b/OpenSim/Framework/Monitoring/Watchdog.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Framework.Monitoring
133 /// /summary> 133 /// /summary>
134 public static event Action<ThreadWatchdogInfo> OnWatchdogTimeout; 134 public static event Action<ThreadWatchdogInfo> OnWatchdogTimeout;
135 135
136 private static JobEngine m_jobEngine; 136 public static JobEngine JobEngine { get; private set; }
137 137
138 /// <summary> 138 /// <summary>
139 /// Is this watchdog active? 139 /// Is this watchdog active?
@@ -175,7 +175,7 @@ namespace OpenSim.Framework.Monitoring
175 175
176 static Watchdog() 176 static Watchdog()
177 { 177 {
178 m_jobEngine = new JobEngine(); 178 JobEngine = new JobEngine();
179 m_threads = new Dictionary<int, ThreadWatchdogInfo>(); 179 m_threads = new Dictionary<int, ThreadWatchdogInfo>();
180 m_watchdogTimer = new System.Timers.Timer(WATCHDOG_INTERVAL_MS); 180 m_watchdogTimer = new System.Timers.Timer(WATCHDOG_INTERVAL_MS);
181 m_watchdogTimer.AutoReset = false; 181 m_watchdogTimer.AutoReset = false;
@@ -463,8 +463,8 @@ namespace OpenSim.Framework.Monitoring
463 return; 463 return;
464 } 464 }
465 465
466 if (m_jobEngine.IsRunning) 466 if (JobEngine.IsRunning)
467 m_jobEngine.QueueRequest(name, callback, obj); 467 JobEngine.QueueRequest(name, callback, obj);
468 else 468 else
469 RunInThread(callback, name, obj, log); 469 RunInThread(callback, name, obj, log);
470 } 470 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 2718785..afe6daa 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1228,10 +1228,14 @@ namespace OpenSim.Region.Framework.Scenes
1228 // viewers without (e.g. v1 viewers) will not, so we still need to make this call. 1228 // viewers without (e.g. v1 viewers) will not, so we still need to make this call.
1229 if (Scene.AttachmentsModule != null) 1229 if (Scene.AttachmentsModule != null)
1230 { 1230 {
1231 Util.FireAndForget(o => 1231 if (Watchdog.JobEngine.IsRunning)
1232 { 1232 Watchdog.RunWhenPossible(
1233 Scene.AttachmentsModule.RezAttachments(this); 1233 "RezAttachments",
1234 }); 1234 o => Scene.AttachmentsModule.RezAttachments(this),
1235 string.Format("Rez attachments for {0} in {1}", Name, Scene.Name),
1236 null);
1237 else
1238 Util.FireAndForget(o => Scene.AttachmentsModule.RezAttachments(this));
1235 } 1239 }
1236 } 1240 }
1237 else 1241 else