aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-05-14 20:37:54 +0000
committerJustin Clarke Casey2009-05-14 20:37:54 +0000
commit62771560448edbc2112d427acd4b37780dfe2154 (patch)
treeba07c1ae1d8de5e24e24a013fcaa39ade898f039 /OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
parent* refactor: move SceneXmlLoader into subpackage (diff)
downloadopensim-SC_OLD-62771560448edbc2112d427acd4b37780dfe2154.zip
opensim-SC_OLD-62771560448edbc2112d427acd4b37780dfe2154.tar.gz
opensim-SC_OLD-62771560448edbc2112d427acd4b37780dfe2154.tar.bz2
opensim-SC_OLD-62771560448edbc2112d427acd4b37780dfe2154.tar.xz
* When saving an oar, save assets when immediately received rather than storing them all up in memory
* Hopefully this will remove out of memory problems when saving large oars on machines without much memory * It may also speed up saving of large oars
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
index a6ad24c..0a882eb 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -35,6 +35,7 @@ using System.Threading;
35using log4net; 35using log4net;
36using OpenMetaverse; 36using OpenMetaverse;
37using OpenSim.Framework; 37using OpenSim.Framework;
38using OpenSim.Framework.Serialization;
38using OpenSim.Region.CoreModules.World.Terrain; 39using OpenSim.Region.CoreModules.World.Terrain;
39using OpenSim.Region.Framework.Interfaces; 40using OpenSim.Region.Framework.Interfaces;
40using OpenSim.Region.Framework.Scenes; 41using OpenSim.Region.Framework.Scenes;
@@ -126,6 +127,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
126 if (regionSettings.TerrainTexture4 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_4) 127 if (regionSettings.TerrainTexture4 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_4)
127 assetUuids[regionSettings.TerrainTexture4] = 1; 128 assetUuids[regionSettings.TerrainTexture4] = 1;
128 129
130 TarArchiveWriter archiveWriter = new TarArchiveWriter(m_saveStream);
131
129 // Asynchronously request all the assets required to perform this archive operation 132 // Asynchronously request all the assets required to perform this archive operation
130 ArchiveWriteRequestExecution awre 133 ArchiveWriteRequestExecution awre
131 = new ArchiveWriteRequestExecution( 134 = new ArchiveWriteRequestExecution(
@@ -133,10 +136,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver
133 m_scene.RequestModuleInterface<ITerrainModule>(), 136 m_scene.RequestModuleInterface<ITerrainModule>(),
134 m_scene.RequestModuleInterface<IRegionSerialiserModule>(), 137 m_scene.RequestModuleInterface<IRegionSerialiserModule>(),
135 m_scene, 138 m_scene,
136 m_saveStream, 139 archiveWriter,
137 m_requestId); 140 m_requestId);
138 141
139 new AssetsRequest(assetUuids.Keys, m_scene.CommsManager.AssetCache, awre.ReceivedAllAssets).Execute(); 142 new AssetsRequest(
143 new AssetsArchiver(archiveWriter), assetUuids.Keys,
144 m_scene.CommsManager.AssetCache, awre.ReceivedAllAssets).Execute();
140 } 145 }
141 } 146 }
142} 147}