diff options
author | Master ScienceSim | 2010-10-28 12:00:04 -0700 |
---|---|---|
committer | Master ScienceSim | 2010-10-28 12:00:04 -0700 |
commit | 68666efd25f4d094949f31eae08ee17fd821b7e4 (patch) | |
tree | 434deb6cc46b270750a08f35399fe00a57088370 | |
parent | Merge branch 'opensim-master' into dev-appearance (diff) | |
download | opensim-SC_OLD-68666efd25f4d094949f31eae08ee17fd821b7e4.zip opensim-SC_OLD-68666efd25f4d094949f31eae08ee17fd821b7e4.tar.gz opensim-SC_OLD-68666efd25f4d094949f31eae08ee17fd821b7e4.tar.bz2 opensim-SC_OLD-68666efd25f4d094949f31eae08ee17fd821b7e4.tar.xz |
Configuration of persistent baked textures and save/send delays.
-rw-r--r-- | OpenSim/Framework/Capabilities/Caps.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 18 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 14 |
3 files changed, 41 insertions, 5 deletions
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index 6b64e12..872de9a 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs | |||
@@ -31,6 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.IO; | 31 | using System.IO; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using log4net; | 33 | using log4net; |
34 | using Nini.Config; | ||
34 | using OpenMetaverse; | 35 | using OpenMetaverse; |
35 | using OpenSim.Framework.Servers; | 36 | using OpenSim.Framework.Servers; |
36 | using OpenSim.Framework.Servers.HttpServer; | 37 | using OpenSim.Framework.Servers.HttpServer; |
@@ -112,6 +113,8 @@ namespace OpenSim.Framework.Capabilities | |||
112 | private string m_regionName; | 113 | private string m_regionName; |
113 | private object m_fetchLock = new Object(); | 114 | private object m_fetchLock = new Object(); |
114 | 115 | ||
116 | private bool m_persistBakedTextures = false; | ||
117 | |||
115 | public bool SSLCaps | 118 | public bool SSLCaps |
116 | { | 119 | { |
117 | get { return m_httpListener.UseSSL; } | 120 | get { return m_httpListener.UseSSL; } |
@@ -145,6 +148,15 @@ namespace OpenSim.Framework.Capabilities | |||
145 | 148 | ||
146 | m_httpListenPort = httpPort; | 149 | m_httpListenPort = httpPort; |
147 | 150 | ||
151 | m_persistBakedTextures = false; | ||
152 | IConfigSource config = m_Scene.Config; | ||
153 | if (config != null) | ||
154 | { | ||
155 | IConfig sconfig = config.Configs["Startup"]; | ||
156 | if (sconfig != null) | ||
157 | m_persistBakedTextures = sconfig.GetBoolean("PersistBakedTextures",m_persistBakedTextures); | ||
158 | } | ||
159 | |||
148 | if (httpServer != null && httpServer.UseSSL) | 160 | if (httpServer != null && httpServer.UseSSL) |
149 | { | 161 | { |
150 | m_httpListenPort = httpServer.SSLPort; | 162 | m_httpListenPort = httpServer.SSLPort; |
@@ -983,7 +995,7 @@ namespace OpenSim.Framework.Capabilities | |||
983 | asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_agentID.ToString()); | 995 | asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_agentID.ToString()); |
984 | asset.Data = data; | 996 | asset.Data = data; |
985 | asset.Temporary = true; | 997 | asset.Temporary = true; |
986 | asset.Local = true; | 998 | asset.Local = ! m_persistBakedTextures; // Local assets aren't persisted, non-local are |
987 | m_assetCache.Store(asset); | 999 | m_assetCache.Store(asset); |
988 | } | 1000 | } |
989 | 1001 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 903e94b..5f8b4f6 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -48,20 +48,30 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
48 | private static readonly byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; | 48 | private static readonly byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; |
49 | private Scene m_scene = null; | 49 | private Scene m_scene = null; |
50 | 50 | ||
51 | private static readonly int m_savetime = 5; // seconds to wait before saving changed appearance | 51 | private int m_savetime = 5; // seconds to wait before saving changed appearance |
52 | private static readonly int m_sendtime = 2; // seconds to wait before sending changed appearance | 52 | private int m_sendtime = 2; // seconds to wait before sending changed appearance |
53 | 53 | ||
54 | private static readonly int m_checkTime = 500; // milliseconds to wait between checks for appearance updates | 54 | private int m_checkTime = 500; // milliseconds to wait between checks for appearance updates |
55 | private System.Timers.Timer m_updateTimer = new System.Timers.Timer(); | 55 | private System.Timers.Timer m_updateTimer = new System.Timers.Timer(); |
56 | private Dictionary<UUID,long> m_savequeue = new Dictionary<UUID,long>(); | 56 | private Dictionary<UUID,long> m_savequeue = new Dictionary<UUID,long>(); |
57 | private Dictionary<UUID,long> m_sendqueue = new Dictionary<UUID,long>(); | 57 | private Dictionary<UUID,long> m_sendqueue = new Dictionary<UUID,long>(); |
58 | 58 | ||
59 | #region RegionModule Members | 59 | #region RegionModule Members |
60 | 60 | ||
61 | public void Initialise(Scene scene, IConfigSource source) | 61 | public void Initialise(Scene scene, IConfigSource config) |
62 | { | 62 | { |
63 | scene.EventManager.OnNewClient += NewClient; | 63 | scene.EventManager.OnNewClient += NewClient; |
64 | 64 | ||
65 | if (config != null) | ||
66 | { | ||
67 | IConfig sconfig = config.Configs["Startup"]; | ||
68 | if (sconfig != null) | ||
69 | { | ||
70 | m_savetime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime))); | ||
71 | m_sendtime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime))); | ||
72 | } | ||
73 | } | ||
74 | |||
65 | if (m_scene == null) | 75 | if (m_scene == null) |
66 | m_scene = scene; | 76 | m_scene = scene; |
67 | } | 77 | } |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 82267ed..5ced7d5 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -255,6 +255,20 @@ | |||
255 | ; OpenJPEG if false | 255 | ; OpenJPEG if false |
256 | ; UseCSJ2K = true | 256 | ; UseCSJ2K = true |
257 | 257 | ||
258 | ; Persist avatar baked textures | ||
259 | ; Persisting baked textures can speed up login and region border | ||
260 | ; crossings especially with large numbers of users, though it | ||
261 | ; will store potentially large numbers of textures in your asset | ||
262 | ; database | ||
263 | PersistBakedTextures = false | ||
264 | |||
265 | ; Control the delay before appearance is sent to other avatars and | ||
266 | ; saved in the avatar service. Attempts to limit the impact caused | ||
267 | ; by the very chatty dialog that sets appearance when an avatar | ||
268 | ; logs in or teleports into a region; values are in seconds | ||
269 | DelayBeforeAppearanceSave = 5 | ||
270 | DelayBeforeAppearanceSend = 2 | ||
271 | |||
258 | [SMTP] | 272 | [SMTP] |
259 | enabled=false | 273 | enabled=false |
260 | 274 | ||