aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2018-09-29 17:42:12 +0100
committerUbitUmarov2018-09-29 17:42:12 +0100
commited0e2623b9dd9e12f7660bb067166c294ad8a2ee (patch)
tree6c596402d4063d421cd013fdb03dba3e7509e39c /OpenSim/Region
parentmore on culture issues (diff)
downloadopensim-SC-ed0e2623b9dd9e12f7660bb067166c294ad8a2ee.zip
opensim-SC-ed0e2623b9dd9e12f7660bb067166c294ad8a2ee.tar.gz
opensim-SC-ed0e2623b9dd9e12f7660bb067166c294ad8a2ee.tar.bz2
opensim-SC-ed0e2623b9dd9e12f7660bb067166c294ad8a2ee.tar.xz
add a few more gc collect in some spots
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs3
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs9
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs7
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs3
5 files changed, 27 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index bd178c0..516c1e5 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -30,6 +30,7 @@ using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Runtime;
33using System.Text; 34using System.Text;
34using System.Threading; 35using System.Threading;
35using System.Timers; 36using System.Timers;
@@ -635,9 +636,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
635 636
636 if(m_scene.GetNumberOfClients() == 0) 637 if(m_scene.GetNumberOfClients() == 0)
637 { 638 {
639 GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
638 GC.Collect(); 640 GC.Collect();
639 GC.WaitForPendingFinalizers(); 641 GC.WaitForPendingFinalizers();
640 GC.Collect(); 642 GC.Collect();
643 GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.Default;
641 } 644 }
642 } 645 }
643 646
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
index 11c53d7..fe74cf1 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
@@ -30,6 +30,7 @@ using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.IO.Compression; 31using System.IO.Compression;
32using System.Reflection; 32using System.Reflection;
33using System.Runtime;
33using System.Text.RegularExpressions; 34using System.Text.RegularExpressions;
34using System.Threading; 35using System.Threading;
35using System.Xml; 36using System.Xml;
@@ -216,6 +217,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver
216 CloseArchive(e.Message); 217 CloseArchive(e.Message);
217 throw; 218 throw;
218 } 219 }
220
221 GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
222 GC.Collect();
223 GC.WaitForPendingFinalizers();
224 GC.Collect();
225 GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.Default;
219 } 226 }
220 227
221 private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, sbyte> assetUuids, 228 private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, sbyte> assetUuids,
@@ -282,6 +289,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
282 289
283 assetGatherer.GatherAll(); 290 assetGatherer.GatherAll();
284 291
292 GC.Collect();
285 int errors = assetGatherer.FailedUUIDs.Count; 293 int errors = assetGatherer.FailedUUIDs.Count;
286 m_log.DebugFormat( 294 m_log.DebugFormat(
287 "[ARCHIVER]: {0} region scene objects to save reference {1} possible assets", 295 "[ARCHIVER]: {0} region scene objects to save reference {1} possible assets",
@@ -313,6 +321,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
313 assetUuids[regionSettings.TerrainTexture4] = (sbyte)AssetType.Texture; 321 assetUuids[regionSettings.TerrainTexture4] = (sbyte)AssetType.Texture;
314 322
315 Save(scene, sceneObjects, regionDir); 323 Save(scene, sceneObjects, regionDir);
324 GC.Collect();
316 } 325 }
317 326
318 /// <summary> 327 /// <summary>
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
index 91f4dc3..6e81025 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
@@ -133,6 +133,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
133 m_timeOutTimer .AutoReset = false; 133 m_timeOutTimer .AutoReset = false;
134 m_timeOutTimer.Elapsed += OnTimeout; 134 m_timeOutTimer.Elapsed += OnTimeout;
135 m_timeout = false; 135 m_timeout = false;
136 int gccontrol = 0;
136 137
137 foreach (KeyValuePair<UUID, sbyte> kvp in m_uuids) 138 foreach (KeyValuePair<UUID, sbyte> kvp in m_uuids)
138 { 139 {
@@ -161,6 +162,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
161 162
162 m_foundAssetUuids.Add(asset.FullID); 163 m_foundAssetUuids.Add(asset.FullID);
163 m_assetsArchiver.WriteAsset(PostProcess(asset)); 164 m_assetsArchiver.WriteAsset(PostProcess(asset));
165 if(++gccontrol > 5000)
166 {
167 gccontrol = 0;
168 GC.Collect();
169 }
164 } 170 }
165 171
166 catch (Exception e) 172 catch (Exception e)
@@ -180,6 +186,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
180 m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} of total possible assets requested were not found, were damaged or were not assets)", 186 m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} of total possible assets requested were not found, were damaged or were not assets)",
181 m_foundAssetUuids.Count, totalerrors); 187 m_foundAssetUuids.Count, totalerrors);
182 188
189 GC.Collect();
183 PerformAssetsRequestCallback(m_timeout); 190 PerformAssetsRequestCallback(m_timeout);
184 } 191 }
185 192
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
index 82cc12c..975184a 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
@@ -31,6 +31,7 @@ using System.Drawing;
31using System.Drawing.Imaging; 31using System.Drawing.Imaging;
32using System.IO; 32using System.IO;
33using System.Reflection; 33using System.Reflection;
34using System.Runtime;
34 35
35using CSJ2K; 36using CSJ2K;
36using Nini.Config; 37using Nini.Config;
@@ -261,8 +262,11 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
261 262
262 m_colors.Clear(); 263 m_colors.Clear();
263 m_warpTextures.Clear(); 264 m_warpTextures.Clear();
265 GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
264 GC.Collect(); 266 GC.Collect();
265// m_log.Debug("[WARP 3D IMAGE MODULE]: GC.Collect()"); 267 GC.WaitForPendingFinalizers();
268 GC.Collect();
269 GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.Default;
266 270
267 return bitmap; 271 return bitmap;
268 } 272 }
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
index a1dd711..732735e 100644
--- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Runtime;
31using System.Net; 32using System.Net;
32using System.IO; 33using System.IO;
33using System.Text; 34using System.Text;
@@ -214,9 +215,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
214 m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue; 215 m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
215 m_scene.LoginLock = false; 216 m_scene.LoginLock = false;
216 217
218 GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
217 GC.Collect(); 219 GC.Collect();
218 GC.WaitForPendingFinalizers(); 220 GC.WaitForPendingFinalizers();
219 GC.Collect(); 221 GC.Collect();
222 GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.Default;
220 223
221 if (!m_scene.StartDisabled) 224 if (!m_scene.StartDisabled)
222 { 225 {