diff options
author | John Hurliman | 2010-09-16 17:30:46 -0700 |
---|---|---|
committer | John Hurliman | 2010-09-16 17:30:46 -0700 |
commit | 860b2a502f797e5822c6705d4639f370f3ac5861 (patch) | |
tree | 5a74ddbd626142e27f6c3439ea267b8ea348ce9c /OpenSim/Region/Framework/Scenes/Serialization | |
parent | Add the modules include line back that i dropped by mistake (diff) | |
download | opensim-SC_OLD-860b2a502f797e5822c6705d4639f370f3ac5861.zip opensim-SC_OLD-860b2a502f797e5822c6705d4639f370f3ac5861.tar.gz opensim-SC_OLD-860b2a502f797e5822c6705d4639f370f3ac5861.tar.bz2 opensim-SC_OLD-860b2a502f797e5822c6705d4639f370f3ac5861.tar.xz |
Changed SceneObjectGroup to store parts with the fast and thread-safe MapAndArray collection
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 5bdaa17..f5f6b90 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -158,16 +158,15 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
158 | writer.WriteEndElement(); | 158 | writer.WriteEndElement(); |
159 | writer.WriteStartElement(String.Empty, "OtherParts", String.Empty); | 159 | writer.WriteStartElement(String.Empty, "OtherParts", String.Empty); |
160 | 160 | ||
161 | lock (sceneObject.Children) | 161 | SceneObjectPart[] parts = sceneObject.Parts; |
162 | for (int i = 0; i < parts.Length; i++) | ||
162 | { | 163 | { |
163 | foreach (SceneObjectPart part in sceneObject.Children.Values) | 164 | SceneObjectPart part = parts[i]; |
165 | if (part.UUID != sceneObject.RootPart.UUID) | ||
164 | { | 166 | { |
165 | if (part.UUID != sceneObject.RootPart.UUID) | 167 | writer.WriteStartElement(String.Empty, "Part", String.Empty); |
166 | { | 168 | ToOriginalXmlFormat(part, writer); |
167 | writer.WriteStartElement(String.Empty, "Part", String.Empty); | 169 | writer.WriteEndElement(); |
168 | ToOriginalXmlFormat(part, writer); | ||
169 | writer.WriteEndElement(); | ||
170 | } | ||
171 | } | 170 | } |
172 | } | 171 | } |
173 | 172 | ||
@@ -281,15 +280,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
281 | sceneObject.RootPart.ToXml(writer); | 280 | sceneObject.RootPart.ToXml(writer); |
282 | writer.WriteStartElement(String.Empty, "OtherParts", String.Empty); | 281 | writer.WriteStartElement(String.Empty, "OtherParts", String.Empty); |
283 | 282 | ||
284 | lock (sceneObject.Children) | 283 | SceneObjectPart[] parts = sceneObject.Parts; |
284 | for (int i = 0; i < parts.Length; i++) | ||
285 | { | 285 | { |
286 | foreach (SceneObjectPart part in sceneObject.Children.Values) | 286 | SceneObjectPart part = parts[i]; |
287 | { | 287 | if (part.UUID != sceneObject.RootPart.UUID) |
288 | if (part.UUID != sceneObject.RootPart.UUID) | 288 | part.ToXml(writer); |
289 | { | ||
290 | part.ToXml(writer); | ||
291 | } | ||
292 | } | ||
293 | } | 289 | } |
294 | 290 | ||
295 | writer.WriteEndElement(); // End of OtherParts | 291 | writer.WriteEndElement(); // End of OtherParts |