diff options
author | Justin Clark-Casey (justincc) | 2010-12-03 00:08:58 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-12-03 00:12:59 +0000 |
commit | 7e72afcb3e9d5467ad4dd2e6ba5d1e0632d77877 (patch) | |
tree | 531cca8628579ea509231a8aa88375f93306c30a /OpenSim/Region/Framework/Scenes/Tests | |
parent | Stop LLUDPServer sending updates after object deletes by always queueing deletes (diff) | |
download | opensim-SC_OLD-7e72afcb3e9d5467ad4dd2e6ba5d1e0632d77877.zip opensim-SC_OLD-7e72afcb3e9d5467ad4dd2e6ba5d1e0632d77877.tar.gz opensim-SC_OLD-7e72afcb3e9d5467ad4dd2e6ba5d1e0632d77877.tar.bz2 opensim-SC_OLD-7e72afcb3e9d5467ad4dd2e6ba5d1e0632d77877.tar.xz |
Only force prim persistence before delete if the prim is the result of an unpersisted delink
This considerably improves delete performance for objects with large linksets
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index f57cf98..b84298f 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -121,13 +121,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
121 | "Not exactly sure what this is asserting..."); | 121 | "Not exactly sure what this is asserting..."); |
122 | 122 | ||
123 | // Delink part 2 | 123 | // Delink part 2 |
124 | grp1.DelinkFromGroup(part2.LocalId); | 124 | SceneObjectGroup grp3 = grp1.DelinkFromGroup(part2.LocalId); |
125 | 125 | ||
126 | if (debugtest) | 126 | if (debugtest) |
127 | m_log.Debug("Group2: Prim2: OffsetPosition:" + part2.AbsolutePosition + ", OffsetRotation:" + part2.RotationOffset); | 127 | m_log.Debug("Group2: Prim2: OffsetPosition:" + part2.AbsolutePosition + ", OffsetRotation:" + part2.RotationOffset); |
128 | 128 | ||
129 | Assert.That(grp1.Parts.Length, Is.EqualTo(1), "Group 1 still contained part2 after delink."); | 129 | Assert.That(grp1.Parts.Length, Is.EqualTo(1), "Group 1 still contained part2 after delink."); |
130 | Assert.That(part2.AbsolutePosition == Vector3.Zero, "The absolute position should be zero"); | 130 | Assert.That(part2.AbsolutePosition == Vector3.Zero, "The absolute position should be zero"); |
131 | Assert.That(grp3.HasGroupChangedDueToDelink, Is.True); | ||
131 | } | 132 | } |
132 | 133 | ||
133 | [Test] | 134 | [Test] |
@@ -325,7 +326,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
325 | 326 | ||
326 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); | 327 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); |
327 | sog.AddPart(linkPart); | 328 | sog.AddPart(linkPart); |
328 | scene.AddNewSceneObject(sog, true); | 329 | scene.AddNewSceneObject(sog, true); |
329 | 330 | ||
330 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked | 331 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked |
331 | // scene backup thread. | 332 | // scene backup thread. |
@@ -333,7 +334,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
333 | 334 | ||
334 | // These changes should occur immediately without waiting for a backup pass | 335 | // These changes should occur immediately without waiting for a backup pass |
335 | SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); | 336 | SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); |
337 | |||
338 | Assert.That(groupToDelete.HasGroupChangedDueToDelink, Is.True); | ||
336 | scene.DeleteSceneObject(groupToDelete, false); | 339 | scene.DeleteSceneObject(groupToDelete, false); |
340 | Assert.That(groupToDelete.HasGroupChangedDueToDelink, Is.False); | ||
337 | 341 | ||
338 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); | 342 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); |
339 | 343 | ||