aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-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
3 files changed, 21 insertions, 1 deletions
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 }