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/SceneObjectGroup.cs | |
parent | Stop LLUDPServer sending updates after object deletes by always queueing deletes (diff) | |
download | opensim-SC-7e72afcb3e9d5467ad4dd2e6ba5d1e0632d77877.zip opensim-SC-7e72afcb3e9d5467ad4dd2e6ba5d1e0632d77877.tar.gz opensim-SC-7e72afcb3e9d5467ad4dd2e6ba5d1e0632d77877.tar.bz2 opensim-SC-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/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 4ec530e..f17fb28 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -119,10 +119,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
119 | timeFirstChanged = DateTime.Now.Ticks; | 119 | timeFirstChanged = DateTime.Now.Ticks; |
120 | } | 120 | } |
121 | m_hasGroupChanged = value; | 121 | m_hasGroupChanged = value; |
122 | |||
123 | // m_log.DebugFormat( | ||
124 | // "[SCENE OBJECT GROUP]: HasGroupChanged set to {0} for {1} {2}", m_hasGroupChanged, Name, LocalId); | ||
122 | } | 125 | } |
123 | 126 | ||
124 | get { return m_hasGroupChanged; } | 127 | get { return m_hasGroupChanged; } |
125 | } | 128 | } |
129 | |||
130 | /// <summary> | ||
131 | /// Has the group changed due to an unlink operation? We record this in order to optimize deletion, since | ||
132 | /// an unlinked group currently has to be persisted to the database before we can perform an unlink operation. | ||
133 | /// </summary> | ||
134 | public bool HasGroupChangedDueToDelink { get; private set; } | ||
126 | 135 | ||
127 | private bool isTimeToPersist() | 136 | private bool isTimeToPersist() |
128 | { | 137 | { |
@@ -1330,6 +1339,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1330 | backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; | 1339 | backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; |
1331 | backup_group.RootPart.ParticleSystem = RootPart.ParticleSystem; | 1340 | backup_group.RootPart.ParticleSystem = RootPart.ParticleSystem; |
1332 | HasGroupChanged = false; | 1341 | HasGroupChanged = false; |
1342 | HasGroupChangedDueToDelink = false; | ||
1333 | 1343 | ||
1334 | m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this); | 1344 | m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this); |
1335 | datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); | 1345 | datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); |
@@ -2208,8 +2218,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2208 | 2218 | ||
2209 | linkPart.Rezzed = RootPart.Rezzed; | 2219 | linkPart.Rezzed = RootPart.Rezzed; |
2210 | 2220 | ||
2211 | //HasGroupChanged = true; | 2221 | // When we delete a group, we currently have to force persist to the database if the object id has changed |
2212 | //ScheduleGroupForFullUpdate(); | 2222 | // (since delete works by deleting all rows which have a given object id) |
2223 | objectGroup.HasGroupChangedDueToDelink = true; | ||
2213 | 2224 | ||
2214 | return objectGroup; | 2225 | return objectGroup; |
2215 | } | 2226 | } |