reduce lock time during object inventory ProcessInventoryBackup

LSLKeyTest
UbitUmarov 2016-07-07 19:54:52 +01:00
parent 668339f936
commit a058fca1ac
1 changed files with 4 additions and 7 deletions

View File

@ -1246,17 +1246,14 @@ namespace OpenSim.Region.Framework.Scenes
// if (HasInventoryChanged) // if (HasInventoryChanged)
// { // {
Items.LockItemsForRead(true); Items.LockItemsForRead(true);
ICollection<TaskInventoryItem> itemsvalues = Items.Values;
HasInventoryChanged = false;
Items.LockItemsForRead(false);
try try
{ {
datastore.StorePrimInventory(m_part.UUID, Items.Values); datastore.StorePrimInventory(m_part.UUID, itemsvalues);
} }
catch {} catch {}
HasInventoryChanged = false;
Items.LockItemsForRead(false);
// } // }
} }