aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-08-31 09:15:08 +0100
committerUbitUmarov2016-08-31 09:15:08 +0100
commit5afc5fe343172c315adec97cd8348357a196d5d2 (patch)
tree88d8410c4f32c8505c048dc45e674bb5d9146212 /OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
parentXengine: remove a no thread safe locking, don't allocate a few objects only n... (diff)
downloadopensim-SC-5afc5fe343172c315adec97cd8348357a196d5d2.zip
opensim-SC-5afc5fe343172c315adec97cd8348357a196d5d2.tar.gz
opensim-SC-5afc5fe343172c315adec97cd8348357a196d5d2.tar.bz2
opensim-SC-5afc5fe343172c315adec97cd8348357a196d5d2.tar.xz
Xengine: try to reduce memory pressure of scripts compile. Still ugly code, possible mistakes, but i need to share it before i loose it :) )
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rwxr-xr-xOpenSim/Region/ScriptEngine/XEngine/XEngine.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index ecd0b69..f42b5ad 100755
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1278,6 +1278,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1278 } 1278 }
1279 } 1279 }
1280 1280
1281 // do not load a assembly on top of a lot of to release memory
1282 // also yield a bit
1283 GC.Collect(2);
1284
1281 ScriptInstance instance = null; 1285 ScriptInstance instance = null;
1282 lock (m_Scripts) 1286 lock (m_Scripts)
1283 { 1287 {
@@ -1501,11 +1505,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1501 m_PrimObjects[localID].Add(itemID); 1505 m_PrimObjects[localID].Add(itemID);
1502 } 1506 }
1503 1507
1504 if (!m_Assemblies.ContainsKey(assetID))
1505 m_Assemblies[assetID] = assemblyPath;
1506 1508
1507 lock (m_AddingAssemblies) 1509 lock (m_AddingAssemblies)
1508 { 1510 {
1511 if (!m_Assemblies.ContainsKey(assetID))
1512 m_Assemblies[assetID] = assemblyPath;
1513
1509 m_AddingAssemblies[assemblyPath]--; 1514 m_AddingAssemblies[assemblyPath]--;
1510 } 1515 }
1511 1516