From 62e0c960363e0949bbc41b072a0dfffb90d19762 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 24 May 2011 03:37:25 +0200 Subject: Allow disabling the legacy backup mechanism to avoid the object clone if backup is not used. --- OpenSim/Region/Framework/Scenes/Scene.cs | 9 +++++++++ OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 5085396..254ad05 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -209,6 +209,7 @@ namespace OpenSim.Region.Framework.Scenes private Timer m_mapGenerationTimer = new Timer(); private bool m_generateMaptiles; + private bool m_useBackup = true; // private Dictionary m_UserNamesCache = new Dictionary(); @@ -477,6 +478,11 @@ namespace OpenSim.Region.Framework.Scenes get { return m_sceneGraph; } } + public bool UseBackup + { + get { return m_useBackup; } + } + // an instance to the physics plugin's Scene object. public PhysicsScene PhysicsScene { @@ -670,6 +676,9 @@ namespace OpenSim.Region.Framework.Scenes IConfig startupConfig = m_config.Configs["Startup"]; m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance); + m_useBackup = startupConfig.GetBoolean("UseSceneBackup", m_useBackup); + if (!m_useBackup) + m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName); //Animation states m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index b100b39..62277ff 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1613,7 +1613,7 @@ namespace OpenSim.Region.Framework.Scenes } - if (HasGroupChanged) + if (m_scene.UseBackup && HasGroupChanged) { // don't backup while it's selected or you're asking for changes mid stream. if (isTimeToPersist() || forcedBackup) -- cgit v1.1