We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

High memory usage


I’m doing some tests with the whole aspose libraries in order to improve the document PDF conversion service i offer in my application wich is currently done using OpenOffice.

In my tests i realized that the Aspose.Words uses a lot of memory, even if i instantiate the Document object with FileInputStream as parameter and this could cause java.lang.OutOfMemoryError even with a 1GB heap space for my test app.

In my test i fired about of 25 threads trying to convert a 1,5MB document and it used about 1GB memory! In this test i checked out that the problem occurs even before i try to convert the document, in the moment i instantiate the Document object.
This is a serious deal breaker since i want to use in a web application with several simultaneously executions and i’m not willing to spend several thousand dollars for a sollution that would be worse than what i currently use.

Is there something i can do to improve this situation?


Hi Janira,

Thanks for your inquiry. It is quite difficult to answer such
questions because performance and memory usage all depend on complexity
and size of the documents you are generating. While rendering a document to fixed page formats (e.g. PDF), Aspose.Words needs to build two model in the memory – one for document and the other for rendered document.

Please note that 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

It would be great if you please share following detail for investigation purposes.

  • Please attach your input Word document.
  • Please

    create a standalone/runnable simple Java application that demonstrates the code (Aspose.Words code) you used to generate
    your output document

As soon as you get these pieces of information to
us we’ll start our investigation into your issue.