aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs2
-rw-r--r--bin/OpenSim.ini.example8
3 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs
index 68ad88d..3519d54 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs
@@ -87,8 +87,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
87 87
88 //private ScriptEngine m_scriptEngine; 88 //private ScriptEngine m_scriptEngine;
89 //public AppDomainManager(ScriptEngine scriptEngine) 89 //public AppDomainManager(ScriptEngine scriptEngine)
90 public AppDomainManager() 90 public AppDomainManager(int MaxScriptsPerDomain)
91 { 91 {
92 maxScriptsPerAppDomain = MaxScriptsPerDomain;
92 //m_scriptEngine = scriptEngine; 93 //m_scriptEngine = scriptEngine;
93 } 94 }
94 95
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
index 8b64d3d..fa40947 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
90 m_EventManager = new EventManager(this, HookUpToServer); 90 m_EventManager = new EventManager(this, HookUpToServer);
91 m_ScriptManager = newScriptManager; 91 m_ScriptManager = newScriptManager;
92 //m_ScriptManager = new ScriptManager(this); 92 //m_ScriptManager = new ScriptManager(this);
93 m_AppDomainManager = new AppDomainManager(); 93 m_AppDomainManager = new AppDomainManager(ScriptConfigSource.GetInt("ScriptsPerAppDomain", 1));
94 m_LSLLongCmdHandler = new LSLLongCmdHandler(this); 94 m_LSLLongCmdHandler = new LSLLongCmdHandler(this);
95 95
96 // Should we iterate the region for scripts that needs starting? 96 // Should we iterate the region for scripts that needs starting?
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 3169cd0..0e3349e 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -155,3 +155,11 @@ DeactivateScriptOnTimeout=false
155; Too low and you will waste lots of CPU 155; Too low and you will waste lots of CPU
156; Too high and people touching object or similar will have to wait up to this amount of time before script responding 156; Too high and people touching object or similar will have to wait up to this amount of time before script responding
157SleepTimeIfNoScriptExecutionMs=50 157SleepTimeIfNoScriptExecutionMs=50
158
159; AppDomains are used for two things:
160; * Security: Scripts inside AppDomains are limited in permissions.
161; * Script unloading: When a script is deactivated it can not be unloaded. Only whole AppDomains can be unloaded.
162; AppDomains are therefore only unloaded once ALL active scripts inside it has been deactivated (removed from prims).
163; Each AppDomain has some memory overhead. But leaving dead scripts in memory also has memory overhead.
164ScriptsPerAppDomain=1
165