diff options
author | Justin Clarke Casey | 2009-03-06 20:12:08 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-03-06 20:12:08 +0000 |
commit | 85774de2310141f4311bc3df1946d44df9ddde59 (patch) | |
tree | e86febe5873121d9a529f6d77a2a7ee929030425 /OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |
parent | * Protects RestClient from crashing with dictionary exception, which leads to... (diff) | |
download | opensim-SC_OLD-85774de2310141f4311bc3df1946d44df9ddde59.zip opensim-SC_OLD-85774de2310141f4311bc3df1946d44df9ddde59.tar.gz opensim-SC_OLD-85774de2310141f4311bc3df1946d44df9ddde59.tar.bz2 opensim-SC_OLD-85774de2310141f4311bc3df1946d44df9ddde59.tar.xz |
* Improve memory usage when writing OARs
* This should make saving large OARs a somewhat better experience
* However, the problem where saving an archive pulls large numbers of assets into the asset cache isn't yet resolved
* This patch also removes lots of archive writing spam that crept in
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index e6146cf..d4c138a 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -173,9 +173,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
173 | //log4net.Config.XmlConfigurator.Configure(); | 173 | //log4net.Config.XmlConfigurator.Configure(); |
174 | 174 | ||
175 | MemoryStream archiveWriteStream = new MemoryStream(); | 175 | MemoryStream archiveWriteStream = new MemoryStream(); |
176 | TarArchiveWriter tar = new TarArchiveWriter(); | 176 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); |
177 | 177 | ||
178 | tar.AddFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile()); | 178 | tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile()); |
179 | 179 | ||
180 | string part1Name = "object1"; | 180 | string part1Name = "object1"; |
181 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateCylinder(); | 181 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateCylinder(); |
@@ -194,9 +194,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
194 | part1Name, | 194 | part1Name, |
195 | Math.Round(groupPosition.X), Math.Round(groupPosition.Y), Math.Round(groupPosition.Z), | 195 | Math.Round(groupPosition.X), Math.Round(groupPosition.Y), Math.Round(groupPosition.Z), |
196 | part1.UUID); | 196 | part1.UUID); |
197 | tar.AddFile(ArchiveConstants.OBJECTS_PATH + object1FileName, object1.ToXmlString2()); | 197 | tar.WriteFile(ArchiveConstants.OBJECTS_PATH + object1FileName, object1.ToXmlString2()); |
198 | 198 | ||
199 | tar.WriteTar(archiveWriteStream); | 199 | tar.Close(); |
200 | 200 | ||
201 | MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); | 201 | MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); |
202 | 202 | ||