Configuration of persistent baked textures and save/send delays.
parent
f2c1d0e34f
commit
68666efd25
|
@ -31,6 +31,7 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
|
@ -112,6 +113,8 @@ namespace OpenSim.Framework.Capabilities
|
|||
private string m_regionName;
|
||||
private object m_fetchLock = new Object();
|
||||
|
||||
private bool m_persistBakedTextures = false;
|
||||
|
||||
public bool SSLCaps
|
||||
{
|
||||
get { return m_httpListener.UseSSL; }
|
||||
|
@ -145,6 +148,15 @@ namespace OpenSim.Framework.Capabilities
|
|||
|
||||
m_httpListenPort = httpPort;
|
||||
|
||||
m_persistBakedTextures = false;
|
||||
IConfigSource config = m_Scene.Config;
|
||||
if (config != null)
|
||||
{
|
||||
IConfig sconfig = config.Configs["Startup"];
|
||||
if (sconfig != null)
|
||||
m_persistBakedTextures = sconfig.GetBoolean("PersistBakedTextures",m_persistBakedTextures);
|
||||
}
|
||||
|
||||
if (httpServer != null && httpServer.UseSSL)
|
||||
{
|
||||
m_httpListenPort = httpServer.SSLPort;
|
||||
|
@ -983,7 +995,7 @@ namespace OpenSim.Framework.Capabilities
|
|||
asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_agentID.ToString());
|
||||
asset.Data = data;
|
||||
asset.Temporary = true;
|
||||
asset.Local = true;
|
||||
asset.Local = ! m_persistBakedTextures; // Local assets aren't persisted, non-local are
|
||||
m_assetCache.Store(asset);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,20 +48,30 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
private static readonly byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 };
|
||||
private Scene m_scene = null;
|
||||
|
||||
private static readonly int m_savetime = 5; // seconds to wait before saving changed appearance
|
||||
private static readonly int m_sendtime = 2; // seconds to wait before sending changed appearance
|
||||
private int m_savetime = 5; // seconds to wait before saving changed appearance
|
||||
private int m_sendtime = 2; // seconds to wait before sending changed appearance
|
||||
|
||||
private static readonly int m_checkTime = 500; // milliseconds to wait between checks for appearance updates
|
||||
private int m_checkTime = 500; // milliseconds to wait between checks for appearance updates
|
||||
private System.Timers.Timer m_updateTimer = new System.Timers.Timer();
|
||||
private Dictionary<UUID,long> m_savequeue = new Dictionary<UUID,long>();
|
||||
private Dictionary<UUID,long> m_sendqueue = new Dictionary<UUID,long>();
|
||||
|
||||
#region RegionModule Members
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
scene.EventManager.OnNewClient += NewClient;
|
||||
|
||||
if (config != null)
|
||||
{
|
||||
IConfig sconfig = config.Configs["Startup"];
|
||||
if (sconfig != null)
|
||||
{
|
||||
m_savetime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime)));
|
||||
m_sendtime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime)));
|
||||
}
|
||||
}
|
||||
|
||||
if (m_scene == null)
|
||||
m_scene = scene;
|
||||
}
|
||||
|
|
|
@ -255,6 +255,20 @@
|
|||
; OpenJPEG if false
|
||||
; UseCSJ2K = true
|
||||
|
||||
; Persist avatar baked textures
|
||||
; Persisting baked textures can speed up login and region border
|
||||
; crossings especially with large numbers of users, though it
|
||||
; will store potentially large numbers of textures in your asset
|
||||
; database
|
||||
PersistBakedTextures = false
|
||||
|
||||
; Control the delay before appearance is sent to other avatars and
|
||||
; saved in the avatar service. Attempts to limit the impact caused
|
||||
; by the very chatty dialog that sets appearance when an avatar
|
||||
; logs in or teleports into a region; values are in seconds
|
||||
DelayBeforeAppearanceSave = 5
|
||||
DelayBeforeAppearanceSend = 2
|
||||
|
||||
[SMTP]
|
||||
enabled=false
|
||||
|
||||
|
|
Loading…
Reference in New Issue