Attempt to cut down how often objects are backed up to the database.
parent
f1be283378
commit
1a33582c05
|
@ -27,6 +27,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public event PrimCountTaintedDelegate OnPrimCountTainted;
|
public event PrimCountTaintedDelegate OnPrimCountTainted;
|
||||||
|
|
||||||
|
public bool HasChanged = false;
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
@ -339,6 +341,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ScheduleGroupForFullUpdate()
|
public void ScheduleGroupForFullUpdate()
|
||||||
{
|
{
|
||||||
|
HasChanged = true;
|
||||||
foreach (SceneObjectPart part in this.m_parts.Values)
|
foreach (SceneObjectPart part in this.m_parts.Values)
|
||||||
{
|
{
|
||||||
part.ScheduleFullUpdate();
|
part.ScheduleFullUpdate();
|
||||||
|
@ -350,6 +353,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ScheduleGroupForTerseUpdate()
|
public void ScheduleGroupForTerseUpdate()
|
||||||
{
|
{
|
||||||
|
HasChanged = true;
|
||||||
foreach (SceneObjectPart part in this.m_parts.Values)
|
foreach (SceneObjectPart part in this.m_parts.Values)
|
||||||
{
|
{
|
||||||
part.ScheduleTerseUpdate();
|
part.ScheduleTerseUpdate();
|
||||||
|
@ -361,6 +365,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendGroupFullUpdate()
|
public void SendGroupFullUpdate()
|
||||||
{
|
{
|
||||||
|
HasChanged = true;
|
||||||
foreach (SceneObjectPart part in this.m_parts.Values)
|
foreach (SceneObjectPart part in this.m_parts.Values)
|
||||||
{
|
{
|
||||||
part.SendFullUpdateToAllClients();
|
part.SendFullUpdateToAllClients();
|
||||||
|
@ -372,6 +377,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendGroupTerseUpdate()
|
public void SendGroupTerseUpdate()
|
||||||
{
|
{
|
||||||
|
HasChanged = true;
|
||||||
foreach (SceneObjectPart part in this.m_parts.Values)
|
foreach (SceneObjectPart part in this.m_parts.Values)
|
||||||
{
|
{
|
||||||
part.SendTerseUpdateToAllClients();
|
part.SendTerseUpdateToAllClients();
|
||||||
|
@ -642,7 +648,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string RequestInventoryFile(uint localID, ModuleAPIMethod<bool, string, byte[]> addXferFile)
|
public string RequestInventoryFile(uint localID, ModuleAPIMethod2<bool, string, byte[]> addXferFile)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = this.GetChildPart(localID);
|
SceneObjectPart part = this.GetChildPart(localID);
|
||||||
if (part != null)
|
if (part != null)
|
||||||
|
@ -968,8 +974,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="datastore"></param>
|
/// <param name="datastore"></param>
|
||||||
public void ProcessBackup(OpenSim.Region.Environment.Interfaces.IRegionDataStore datastore)
|
public void ProcessBackup(OpenSim.Region.Environment.Interfaces.IRegionDataStore datastore)
|
||||||
|
{
|
||||||
|
if (HasChanged)
|
||||||
{
|
{
|
||||||
datastore.StoreObject(this, m_scene.RegionInfo.SimUUID);
|
datastore.StoreObject(this, m_scene.RegionInfo.SimUUID);
|
||||||
|
HasChanged = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -363,6 +363,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ScheduleFullUpdate()
|
public void ScheduleFullUpdate()
|
||||||
{
|
{
|
||||||
|
m_parentGroup.HasChanged = true;
|
||||||
m_updateFlag = 2;
|
m_updateFlag = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,6 +374,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (m_updateFlag < 1)
|
if (m_updateFlag < 1)
|
||||||
{
|
{
|
||||||
|
m_parentGroup.HasChanged = true;
|
||||||
m_updateFlag = 1;
|
m_updateFlag = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -482,7 +484,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string RequestInventoryFile(ModuleAPIMethod<bool, string, byte[]> addXferFile)
|
public string RequestInventoryFile(ModuleAPIMethod2<bool, string, byte[]> addXferFile)
|
||||||
{
|
{
|
||||||
byte[] fileData = new byte[0];
|
byte[] fileData = new byte[0];
|
||||||
InventoryStringBuilder invString = new InventoryStringBuilder(m_folderID, this.UUID);
|
InventoryStringBuilder invString = new InventoryStringBuilder(m_folderID, this.UUID);
|
||||||
|
|
Loading…
Reference in New Issue