We've been using Aspose.Words for .NET (version 9.2.0) and for Java (version 10.1.0) to generate reports which can be saved in docx, doc, html or pdf formats. We've noticed a much slower execution when saving a report to html in Java (compared to saving the same report in .NET).
I've measured the time it takes the Document.Save(string, SaveFormat) method to return and found that the Java Document.Save() takes ~93% more time to execute (in avarage 10905 milliseconds in .NET vs 21060 milliseconds in Java). In docx the difference is much smaller and in favor of the Java impl (5240 milliseconds in .NET vs. 4400 milliseconds in Java). The same algorithms were used to create a document both in Java and in .NET so the structure of the documet object that is being saved should be the same.
The report I used has 1024 records and in docx it has 643 pages. The produced html file is 34023 KB and the produced docx file is 2042 KB.
Is there a known issue about the slow execution of the Java Document.Save()? Are there any recommendations as to how to build a document so it's saving will be faster?