Config option to set number of scripts per AppDomain
parent
e14c8f59f7
commit
0c0286911d
|
@ -87,8 +87,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
||||||
|
|
||||||
//private ScriptEngine m_scriptEngine;
|
//private ScriptEngine m_scriptEngine;
|
||||||
//public AppDomainManager(ScriptEngine scriptEngine)
|
//public AppDomainManager(ScriptEngine scriptEngine)
|
||||||
public AppDomainManager()
|
public AppDomainManager(int MaxScriptsPerDomain)
|
||||||
{
|
{
|
||||||
|
maxScriptsPerAppDomain = MaxScriptsPerDomain;
|
||||||
//m_scriptEngine = scriptEngine;
|
//m_scriptEngine = scriptEngine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
||||||
m_EventManager = new EventManager(this, HookUpToServer);
|
m_EventManager = new EventManager(this, HookUpToServer);
|
||||||
m_ScriptManager = newScriptManager;
|
m_ScriptManager = newScriptManager;
|
||||||
//m_ScriptManager = new ScriptManager(this);
|
//m_ScriptManager = new ScriptManager(this);
|
||||||
m_AppDomainManager = new AppDomainManager();
|
m_AppDomainManager = new AppDomainManager(ScriptConfigSource.GetInt("ScriptsPerAppDomain", 1));
|
||||||
m_LSLLongCmdHandler = new LSLLongCmdHandler(this);
|
m_LSLLongCmdHandler = new LSLLongCmdHandler(this);
|
||||||
|
|
||||||
// Should we iterate the region for scripts that needs starting?
|
// Should we iterate the region for scripts that needs starting?
|
||||||
|
|
|
@ -155,3 +155,11 @@ DeactivateScriptOnTimeout=false
|
||||||
; Too low and you will waste lots of CPU
|
; Too low and you will waste lots of CPU
|
||||||
; Too high and people touching object or similar will have to wait up to this amount of time before script responding
|
; Too high and people touching object or similar will have to wait up to this amount of time before script responding
|
||||||
SleepTimeIfNoScriptExecutionMs=50
|
SleepTimeIfNoScriptExecutionMs=50
|
||||||
|
|
||||||
|
; AppDomains are used for two things:
|
||||||
|
; * Security: Scripts inside AppDomains are limited in permissions.
|
||||||
|
; * Script unloading: When a script is deactivated it can not be unloaded. Only whole AppDomains can be unloaded.
|
||||||
|
; AppDomains are therefore only unloaded once ALL active scripts inside it has been deactivated (removed from prims).
|
||||||
|
; Each AppDomain has some memory overhead. But leaving dead scripts in memory also has memory overhead.
|
||||||
|
ScriptsPerAppDomain=1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue