aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTedd Hansen2008-02-01 20:52:00 +0000
committerTedd Hansen2008-02-01 20:52:00 +0000
commit0c0286911d7e7be0f0f0e0923a2776792f23d133 (patch)
tree4506f4f1489e04bc7d27dc3f4d19d5c6cc65da1c
parentAdded config options: (diff)
downloadopensim-SC_OLD-0c0286911d7e7be0f0f0e0923a2776792f23d133.zip
opensim-SC_OLD-0c0286911d7e7be0f0f0e0923a2776792f23d133.tar.gz
opensim-SC_OLD-0c0286911d7e7be0f0f0e0923a2776792f23d133.tar.bz2
opensim-SC_OLD-0c0286911d7e7be0f0f0e0923a2776792f23d133.tar.xz
Config option to set number of scripts per AppDomain
-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