I’m finding that a simple console app using GroupDocs.Conversion to convert a 4 page Word document is using memory (Private Working Set) in the range 300MB-700MB on a Windows 2012 Standard with the latest updates.
When I use Office Automation, neither WinWord.exe nor the controlling application use much more than 40MB combined for the same conversion. This is what we’re looking to replace so the large difference in memory usage is getting some push back.
I’ve tried setting UseCache to false but it seemed to have no effect. In our case, we wouldn’t want any files cached as the source documents are usually unique.
I also tried updating to 18.1.0 because I saw in the release notes it mentions LocalCacheDataHandler but I can’t find any documentation that references this class so I’m not sure it would give me any additional control in turning off caching. At this point, I don’t know that caching is the problem–I was just looking for something to give me a little more insight into what could be holding on to the memory.
Below is the code I’m using. It gets executed 3 times for the same document in my default test. I’m hoping there’s something I can do reduce memory usage at the very least when conversion is complete and/or between conversions.
Any help you could provide would be appreciated.
var config = new ConversionConfig();
var conv = new ConversionHandler(config);
var imageSaveOptions = new ImageSaveOptions
ConvertFileType = ImageSaveOptions.ImageFileType.Tiff,
Grayscale = true,
Compression = TiffOptions.TiffCompression.Ccitt4
HorizontalResolution = 203,
VerticalResolution = 192,
var loadOptions = new LoadOptions();
using (var source = File.OpenRead(parameters.Source.File))
using (var destination = File.OpenWrite(parameters.Target.File))
using (var result = conv.Convert(source, loadOptions, imageSaveOptions))