Free Support Forum - aspose.com

Performance issue in Aspose.Words URGENT!

We are using Aspose.Words.Document 15.1.0.0 to convert docx to pdf. Please see code file (DOCXPrinter.Print) and docx file (Indemnity Agreement Long Form - V1Original.docx) attached. We’re experiencing poor performance during

  1. instantiating Aspose.Words.Document [Aspose.Words.Document doc = new Aspose.Words.Document(wordDocStream);] 3.2 seconds
  2. saving the docx as pdf [doc.Save(asposePdfStream, Aspose.Words.SaveFormat.Pdf);] 6.95 seconds

Please inspect the code and input file and advise how to improve performance. This is urgent production issue and needs resolution asap.


Please note, modifying docx file is NOT an option. We need a programmatic solution.

Thanks,
Igor.

Hi Igor,

Thanks for your inquiry. It is quite difficult to answer such
questions because CPU performance and memory usage all depend on
complexity and size of the documents you are loading/generating.


In
terms of memory, Aspose.Words does not have any limitations. If you’re
loading huge Word documents into Aspose.Words’ DOM, more memory would be
required. This is because during processing, the document needs to be
held wholly in memory.

While rendering a document to fixed page formats (e.g. PDF, Jpeg, Xps), Aspose.Words needs to build two model in the memory – one for document and the other for rendered document.

The process of building layout model is
not linear; it may take a minute to render one page and may take a few
seconds to render 100 pages. Also, Aspose.Words has to create APS (Aspose Page Specification)
model in memory and this may again eat some more time for some
documents. Rest assured, we’re always working on improving performance;
but, rendering will be always running slower than simple saving to flow
formats (e.g doc/docx).

I have converted the shared document into Pdf using latest version of Aspose.Words for .NET 15.5.0 at Windows 7, 8 GB Ram and following are the results. I suggest you please use Aspose.Words for .NET 15.5.0.

Loading of Document takes .68 second
Saving document to Pdf takes 1.5 seconds