From d188ed8ed86661a79b68f5c43ce0a94dc51308f0 Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Sat, 26 Jun 2010 13:07:17 -0700 Subject: Return everything at once, it's more efficient that way --- OpenSim/Region/Framework/Scenes/Scene.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index abc7377..bbac919 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2191,6 +2191,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void DeleteAllSceneObjects(bool exceptNoCopy) { + List toReturn = new List(); lock (Entities) { ICollection entities = new List(Entities); @@ -2208,12 +2209,16 @@ namespace OpenSim.Region.Framework.Scenes } else { - DeRezObject(null, sog.RootPart.LocalId, sog.RootPart.GroupID, DeRezAction.Return, UUID.Zero); + toReturn.Add((SceneObjectGroup)e); } } } } } + if (toReturn.Count > 0) + { + returnObjects(toReturn.ToArray(), UUID.Zero); + } } /// -- cgit v1.1