LINQ Reporting Engine - OutOfMemory Exception While Saving Document

I am trying to create document using template with LINQ Reporting Engine Provided By Aspose.
During Save method, it is either throwing OutOfMemory Exception or takes too much time if used MemoryOptimization flag as true. In latter case, it takes more than 45 minutes but never comes back and I have to stop the application.

Currently I have created small test application where this issue can be reproduced.
This app is attached here. I have removed the my Words license file and latest version of Aspose.Words 18.3 has been used. For large size of folder, I have removed binaries and packages but building this application should work correctly.
TestAsposeSearchResultConsole.zip (76.6 KB)

In application, I am using template with only 1k records but my requirement is around 10k records.
Also output document will be merged into another document with formatting intact and certain other features like Table of Contents page.
In addition, document should be exported into DOCX, PDF and RTF format.

Considering OutOfMemory Exception, please check and let me know if this is possible using LINQ Reporting Engine and can Aspose handle these much of records for building document.

@psluzhevsky,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-16621. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi,

Will there be a difference in the size of the saved docx file, if the document is generated using the conventional DOM objects or the LINQ Reporting Engine (contents being exactly the same)?

Thanks.

@ASHPose,

Thanks for your inquiry. No, there will be no difference in size of output document.

@ASHPose,

Thanks for your patience. Please use latest version of Aspose.Words for .NET 18.6 and SaveOptions.TempFolder property as shown below to fix the shared issue.

Document document = new Document(template); 
ReportingEngine engine = new ReportingEngine();
engine.BuildReport(document, data, "data");
 
//WITH Save Options
SaveOptions saveOptions = SaveOptions.CreateSaveOptions(SaveFormat.Docx);
saveOptions.TempFolder = @"c:\temp\";
                     
document.Save(output, saveOptions);

The issues you have found earlier (filed as WORDSNET-16621) have been fixed in this Aspose.Words for .NET 18.9 update and this Aspose.Words for Java 18.9 update.