SaveOptions.MemoryOptimization
SaveOptions MemoryOptimization property. Gets or sets value determining if memory optimization should be performed before saving the document. Default value for this property is false.
SaveOptions.MemoryOptimization property
Gets or sets value determining if memory optimization should be performed before saving the document. Default value for this property is false
.
public bool MemoryOptimization { get; set; }
Remarks
Setting this option to true
can significantly decrease memory consumption while saving large documents at the cost of slower saving time.
Examples
Shows how to reduce Wordize memory footprint.
string tempDir = ArtifactsDir + "TempFiles";
// The specified temporary folder must exist in the local file system.
Directory.CreateDirectory(tempDir);
SaveOptions so = SaveOptions.CreateSaveOptions(SaveFormat.Docx);
so.MemoryOptimization = true;
so.TempFolder = tempDir;
LoadOptions lo = new LoadOptions();
lo.TempFolder = tempDir;
Converter.Create()
.From(MyDir + "Simple.docx", lo)
.To(ArtifactsDir + "SaveOptions.MemoryOptimization.docx", so)
.Execute();
See Also
- class SaveOptions
- namespace Wordize.Saving
- assembly Wordize