diff options
author | UbitUmarov | 2018-09-29 17:42:12 +0100 |
---|---|---|
committer | UbitUmarov | 2018-09-29 17:42:12 +0100 |
commit | ed0e2623b9dd9e12f7660bb067166c294ad8a2ee (patch) | |
tree | 6c596402d4063d421cd013fdb03dba3e7509e39c /OpenSim/Region | |
parent | more on culture issues (diff) | |
download | opensim-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 '')
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; | |||
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.Runtime; | ||
33 | using System.Text; | 34 | using System.Text; |
34 | using System.Threading; | 35 | using System.Threading; |
35 | using System.Timers; | 36 | using 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; | |||
30 | using System.IO; | 30 | using System.IO; |
31 | using System.IO.Compression; | 31 | using System.IO.Compression; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.Runtime; | ||
33 | using System.Text.RegularExpressions; | 34 | using System.Text.RegularExpressions; |
34 | using System.Threading; | 35 | using System.Threading; |
35 | using System.Xml; | 36 | using 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; | |||
31 | using System.Drawing.Imaging; | 31 | using System.Drawing.Imaging; |
32 | using System.IO; | 32 | using System.IO; |
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | using System.Runtime; | ||
34 | 35 | ||
35 | using CSJ2K; | 36 | using CSJ2K; |
36 | using Nini.Config; | 37 | using 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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System.Runtime; | ||
31 | using System.Net; | 32 | using System.Net; |
32 | using System.IO; | 33 | using System.IO; |
33 | using System.Text; | 34 | using 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 | { |