mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 13:15:44 +08:00
Experimental change to use an immutable array for iterating ScenePresences, avoiding locking and copying the list each time it is accessed
This commit is contained in:
@@ -68,11 +68,11 @@ namespace OpenSim.Region.UserStatistics
|
||||
HTMLUtil.OL_O(ref output, "");
|
||||
foreach (Scene scene in all_scenes)
|
||||
{
|
||||
List<ScenePresence> avatarInScene = scene.GetScenePresences();
|
||||
ScenePresence[] avatarInScene = scene.GetScenePresences();
|
||||
|
||||
HTMLUtil.LI_O(ref output, "");
|
||||
HTMLUtil.LI_O(ref output, String.Empty);
|
||||
output.Append(scene.RegionInfo.RegionName);
|
||||
HTMLUtil.OL_O(ref output, "");
|
||||
HTMLUtil.OL_O(ref output, String.Empty);
|
||||
foreach (ScenePresence av in avatarInScene)
|
||||
{
|
||||
Dictionary<string,string> queues = new Dictionary<string, string>();
|
||||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.UserStatistics
|
||||
IStatsCollector isClient = (IStatsCollector) av.ControllingClient;
|
||||
queues = decodeQueueReport(isClient.Report());
|
||||
}
|
||||
HTMLUtil.LI_O(ref output, "");
|
||||
HTMLUtil.LI_O(ref output, String.Empty);
|
||||
output.Append(av.Name);
|
||||
output.Append(" ");
|
||||
output.Append((av.IsChildAgent ? "Child" : "Root"));
|
||||
@@ -96,12 +96,12 @@ namespace OpenSim.Region.UserStatistics
|
||||
(int) av.AbsolutePosition.Z));
|
||||
}
|
||||
Dictionary<string, int> throttles = DecodeClientThrottles(av.ControllingClient.GetThrottlesPacked(1));
|
||||
|
||||
HTMLUtil.UL_O(ref output, "");
|
||||
|
||||
HTMLUtil.UL_O(ref output, String.Empty);
|
||||
|
||||
foreach (string throttlename in throttles.Keys)
|
||||
{
|
||||
HTMLUtil.LI_O(ref output, "");
|
||||
HTMLUtil.LI_O(ref output, String.Empty);
|
||||
output.Append(throttlename);
|
||||
output.Append(":");
|
||||
output.Append(throttles[throttlename].ToString());
|
||||
|
||||
Reference in New Issue
Block a user