Need help/recommendation in improving response time for Aspose.Words for Java

Need help/recommendation in improving response time for Aspose.Words for Java. Currently we are seeing response time’s avg 300 ms .We would like to archive less than 100ms response times.

we tried saving the output to stream instead of file but no significant performance improvement.

Any recommendations would be greatly appreciated. Thanks

Hi Siva,

Thanks for your inquiry. Please note that performance and memory usage all depend on complexity and size of the documents you are generating.

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 and memory for some documents.

We're always working on improving performance; but, rendering will be always running slower than simple saving to flow formats (e.g. doc/docx).

Could you please share your documents and code example here for testing? We will investigate the issue and provide you more information about your query.

Thanks for your response.



attached documents and code for your review and testing .



Please let me know of any questions. Thanks.

Hi Siva,

Thanks for sharing the detail. You are using the Aspose.Words' code correctly. If you are using older version of Aspose.Words, we suggest you please upgrade to the latest version of Aspose.Words for Java 17.2.0.

If you want to save all pages of document to Pdf, please do not use setPageIndex and setPageCount methods in generatePDF method.

As shared earlier, please note that performance and memory usage all depend on complexity and size of the documents you are generating. Please let us know if you have any more queries.