diff options
author | UbitUmarov | 2016-11-03 12:58:43 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-03 12:58:43 +0000 |
commit | 73b20c2ca25e5ee6f1b6673ef764c4da40625ec3 (patch) | |
tree | 8a0bbaa62ef0495a96a19004d5b8c16c801affc8 /OpenSim/Region/ScriptEngine | |
parent | ubOde: if a mesh does not contain data for shape type PRIM, dont collide as c... (diff) | |
download | opensim-SC_OLD-73b20c2ca25e5ee6f1b6673ef764c4da40625ec3.zip opensim-SC_OLD-73b20c2ca25e5ee6f1b6673ef764c4da40625ec3.tar.gz opensim-SC_OLD-73b20c2ca25e5ee6f1b6673ef764c4da40625ec3.tar.bz2 opensim-SC_OLD-73b20c2ca25e5ee6f1b6673ef764c4da40625ec3.tar.xz |
XEngine: make calls to gc.collect on region startup scripts loading a configurable option, since it is very slow operation
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rwxr-xr-x | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 3038915..e12f850 100755 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -110,6 +110,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
110 | private int m_ScriptFailCount; // Number of script fails since compile queue was last empty | 110 | private int m_ScriptFailCount; // Number of script fails since compile queue was last empty |
111 | private string m_ScriptErrorMessage; | 111 | private string m_ScriptErrorMessage; |
112 | private bool m_AppDomainLoading; | 112 | private bool m_AppDomainLoading; |
113 | private bool m_CompactMemOnLoad; | ||
113 | private Dictionary<UUID,ArrayList> m_ScriptErrors = | 114 | private Dictionary<UUID,ArrayList> m_ScriptErrors = |
114 | new Dictionary<UUID,ArrayList>(); | 115 | new Dictionary<UUID,ArrayList>(); |
115 | 116 | ||
@@ -301,8 +302,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
301 | m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300); | 302 | m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300); |
302 | m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144); | 303 | m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144); |
303 | m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000; | 304 | m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000; |
304 | m_AppDomainLoading = m_ScriptConfig.GetBoolean("AppDomainLoading", true); | 305 | m_AppDomainLoading = m_ScriptConfig.GetBoolean("AppDomainLoading", false); |
305 | 306 | m_CompactMemOnLoad = m_ScriptConfig.GetBoolean("CompactMemOnLoad", false); | |
306 | m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30); | 307 | m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30); |
307 | m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false); | 308 | m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false); |
308 | m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000; | 309 | m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000; |
@@ -1278,10 +1279,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1278 | } | 1279 | } |
1279 | } | 1280 | } |
1280 | 1281 | ||
1281 | // do not load a assembly on top of a lot of to release memory | 1282 | // optionaly do not load a assembly on top of a lot of to release memory |
1282 | // also yield a bit | 1283 | // only if logins disable since causes a lot of rubber banding |
1283 | // only if logins disable since causes a lot of rubber banding | 1284 | if(m_CompactMemOnLoad && !m_Scene.LoginsEnabled) |
1284 | if(!m_Scene.LoginsEnabled) | ||
1285 | GC.Collect(2); | 1285 | GC.Collect(2); |
1286 | 1286 | ||
1287 | ScriptInstance instance = null; | 1287 | ScriptInstance instance = null; |