aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
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/Framework/Scenes/Scene.Inventory.cs
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 '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs22
1 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 8ed8b96..2ac46e2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2004,11 +2004,12 @@ namespace OpenSim.Region.Framework.Scenes
2004 sog.SetGroup(groupID, remoteClient); 2004 sog.SetGroup(groupID, remoteClient);
2005 sog.ScheduleGroupForFullUpdate(); 2005 sog.ScheduleGroupForFullUpdate();
2006 2006
2007 List<SceneObjectPart> partList = null;
2007 lock (sog.Children) 2008 lock (sog.Children)
2008 { 2009 partList = new List<SceneObjectPart>(sog.Children.Values);
2009 foreach (SceneObjectPart child in sog.Children.Values) 2010
2010 child.Inventory.ChangeInventoryOwner(ownerID); 2011 foreach (SceneObjectPart child in partList)
2011 } 2012 child.Inventory.ChangeInventoryOwner(ownerID);
2012 } 2013 }
2013 else 2014 else
2014 { 2015 {
@@ -2017,14 +2018,15 @@ namespace OpenSim.Region.Framework.Scenes
2017 2018
2018 if (sog.GroupID != groupID) 2019 if (sog.GroupID != groupID)
2019 continue; 2020 continue;
2020 2021
2022 List<SceneObjectPart> partList = null;
2021 lock (sog.Children) 2023 lock (sog.Children)
2024 partList = new List<SceneObjectPart>(sog.Children.Values);
2025
2026 foreach (SceneObjectPart child in partList)
2022 { 2027 {
2023 foreach (SceneObjectPart child in sog.Children.Values) 2028 child.LastOwnerID = child.OwnerID;
2024 { 2029 child.Inventory.ChangeInventoryOwner(groupID);
2025 child.LastOwnerID = child.OwnerID;
2026 child.Inventory.ChangeInventoryOwner(groupID);
2027 }
2028 } 2030 }
2029 2031
2030 sog.SetOwnerId(groupID); 2032 sog.SetOwnerId(groupID);