From 288baaecaf4933568c53fc052314599d1520bbed Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 7 Sep 2012 00:46:24 +0100 Subject: Add warning chevrons around the GC.Collect added to Warp3DImageModule in commit 5eb2526 Manually calling GC.Collect() really shouldnt' be necessary and is generally regarded as a bad idea. A GC should occur anyway pretty shortly afterwards. However, can leave this in development code for now to see if it does actually make a significant difference rather than simply doing a GC a little earlier. --- OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index ed9b127..2d762fb 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs @@ -208,6 +208,10 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap bitmap = ImageUtils.ResizeImage(origBitmap, viewport.Width, viewport.Height); } + // XXX: It shouldn't really be necesary to force a GC here as one should occur anyway pretty shortly + // afterwards. It's generally regarded as a bad idea to manually GC. If Warp3D is using lots of memory + // then this may be some issue with the Warp3D code itself, though it's also quite possible that generating + // this map tile simply takes a lot of memory. GC.Collect(); m_log.Debug("[WARP 3D IMAGE MODULE]: GC.Collect()"); -- cgit v1.1