aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/UserStatistics
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-23 01:02:36 -0700
committerJohn Hurliman2009-10-23 01:02:36 -0700
commit588361e2a2398b963871762c2b5485c6a086cf47 (patch)
tree5be2c6705096817c599075da4e12a0e9b0a4c841 /OpenSim/Region/UserStatistics
parentAdded VS2010 support to Prebuild and created runprebuild2010.bat (diff)
downloadopensim-SC_OLD-588361e2a2398b963871762c2b5485c6a086cf47.zip
opensim-SC_OLD-588361e2a2398b963871762c2b5485c6a086cf47.tar.gz
opensim-SC_OLD-588361e2a2398b963871762c2b5485c6a086cf47.tar.bz2
opensim-SC_OLD-588361e2a2398b963871762c2b5485c6a086cf47.tar.xz
Experimental change to use an immutable array for iterating ScenePresences, avoiding locking and copying the list each time it is accessed
Diffstat (limited to 'OpenSim/Region/UserStatistics')
-rw-r--r--OpenSim/Region/UserStatistics/ActiveConnectionsAJAX.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/UserStatistics/ActiveConnectionsAJAX.cs b/OpenSim/Region/UserStatistics/ActiveConnectionsAJAX.cs
index d7c39a3..704b74f 100644
--- a/OpenSim/Region/UserStatistics/ActiveConnectionsAJAX.cs
+++ b/OpenSim/Region/UserStatistics/ActiveConnectionsAJAX.cs
@@ -68,11 +68,11 @@ namespace OpenSim.Region.UserStatistics
68 HTMLUtil.OL_O(ref output, ""); 68 HTMLUtil.OL_O(ref output, "");
69 foreach (Scene scene in all_scenes) 69 foreach (Scene scene in all_scenes)
70 { 70 {
71 List<ScenePresence> avatarInScene = scene.GetScenePresences(); 71 ScenePresence[] avatarInScene = scene.GetScenePresences();
72 72
73 HTMLUtil.LI_O(ref output, ""); 73 HTMLUtil.LI_O(ref output, String.Empty);
74 output.Append(scene.RegionInfo.RegionName); 74 output.Append(scene.RegionInfo.RegionName);
75 HTMLUtil.OL_O(ref output, ""); 75 HTMLUtil.OL_O(ref output, String.Empty);
76 foreach (ScenePresence av in avatarInScene) 76 foreach (ScenePresence av in avatarInScene)
77 { 77 {
78 Dictionary<string,string> queues = new Dictionary<string, string>(); 78 Dictionary<string,string> queues = new Dictionary<string, string>();
@@ -81,7 +81,7 @@ namespace OpenSim.Region.UserStatistics
81 IStatsCollector isClient = (IStatsCollector) av.ControllingClient; 81 IStatsCollector isClient = (IStatsCollector) av.ControllingClient;
82 queues = decodeQueueReport(isClient.Report()); 82 queues = decodeQueueReport(isClient.Report());
83 } 83 }
84 HTMLUtil.LI_O(ref output, ""); 84 HTMLUtil.LI_O(ref output, String.Empty);
85 output.Append(av.Name); 85 output.Append(av.Name);
86 output.Append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"); 86 output.Append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
87 output.Append((av.IsChildAgent ? "Child" : "Root")); 87 output.Append((av.IsChildAgent ? "Child" : "Root"));
@@ -96,12 +96,12 @@ namespace OpenSim.Region.UserStatistics
96 (int) av.AbsolutePosition.Z)); 96 (int) av.AbsolutePosition.Z));
97 } 97 }
98 Dictionary<string, int> throttles = DecodeClientThrottles(av.ControllingClient.GetThrottlesPacked(1)); 98 Dictionary<string, int> throttles = DecodeClientThrottles(av.ControllingClient.GetThrottlesPacked(1));
99 99
100 HTMLUtil.UL_O(ref output, ""); 100 HTMLUtil.UL_O(ref output, String.Empty);
101 101
102 foreach (string throttlename in throttles.Keys) 102 foreach (string throttlename in throttles.Keys)
103 { 103 {
104 HTMLUtil.LI_O(ref output, ""); 104 HTMLUtil.LI_O(ref output, String.Empty);
105 output.Append(throttlename); 105 output.Append(throttlename);
106 output.Append(":"); 106 output.Append(":");
107 output.Append(throttles[throttlename].ToString()); 107 output.Append(throttles[throttlename].ToString());