aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-08-28 00:40:33 +0100
committerJustin Clark-Casey (justincc)2010-08-28 00:40:33 +0100
commit1c0b4457cdcd543f04bc818a987f6e3f2311098d (patch)
tree56b6a949423b5ca0f54b2c200e037052a9ac3ff0 /OpenSim/Region/OptionalModules/Scripting
parentminor: reduce log chattiness of "load iar" for IARs with lots of folders (diff)
downloadopensim-SC_OLD-1c0b4457cdcd543f04bc818a987f6e3f2311098d.zip
opensim-SC_OLD-1c0b4457cdcd543f04bc818a987f6e3f2311098d.tar.gz
opensim-SC_OLD-1c0b4457cdcd543f04bc818a987f6e3f2311098d.tar.bz2
opensim-SC_OLD-1c0b4457cdcd543f04bc818a987f6e3f2311098d.tar.xz
Improve liveness by operating on list copies of SOG.Children where appropriate
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs22
1 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
index 34171b0..c439e3e 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
@@ -186,18 +186,20 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
186 { 186 {
187 SceneObjectPart my = GetSOP(); 187 SceneObjectPart my = GetSOP();
188 IObject[] rets = null; 188 IObject[] rets = null;
189 189
190 int total = my.ParentGroup.PrimCount;
191
192 rets = new IObject[total];
193
194 int i = 0;
195
196 List<SceneObjectPart> partList = null;
190 lock (my.ParentGroup.Children) 197 lock (my.ParentGroup.Children)
198 partList = new List<SceneObjectPart>(my.ParentGroup.Children.Values);
199
200 foreach (SceneObjectPart part in partList)
191 { 201 {
192 int total = my.ParentGroup.Children.Count; 202 rets[i++] = new SOPObject(m_rootScene, part.LocalId, m_security);
193
194 rets = new IObject[total];
195
196 int i = 0;
197 foreach (KeyValuePair<UUID, SceneObjectPart> pair in my.ParentGroup.Children)
198 {
199 rets[i++] = new SOPObject(m_rootScene, pair.Value.LocalId, m_security);
200 }
201 } 203 }
202 204
203 return rets; 205 return rets;