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

Free Support Forum - aspose.com

Total number of pages word generation capacity decreases with JRE 7

Hi Team,

When I generate large word document using Aspose.Words.Java 13.x OR 14.x using JRE 1.7, the total number of pages generation capacity reduces. If I use JRE 1.6, I’m able to generate 2000+ more pages when compared to JRE7 in a document. The number might not be same in all cases as it would depends on the content of the document.

Total number of pages generate with JRE 6: 19,000
Total number of pages generate with JRE 7: 16,500

I’ve tested this with IBM and Oracle JRE. The result is the same.

I’m attaching the results along with standalone code to replicate the issue.

Thanks,
Kumar

The output would be like this.

Aspose product and version is = Aspose.Words for Java : 14.5.0.0
Java version: 1.6.0
Java vendor: IBM Corporation
Java arch: x86
Total count is: 8600
Max heap size: 1024
Total time taken is: 153 seconds
RPE Document used memory (approx) 882 MB.
Result: C:\Users\IBM_AD~1\AppData\Local\Temp\testAsposeTotalNumberOfPages_8600_14.5.0.0.doc

The above case fails with JRE 7. It fails for count 8500 too.

As a simple test, you could observe that Aspose.WordsForJava with JRE7 consumes 10-20% more memory when compared to JRE6. This impacts scalability.

Hi Kumar,


Thanks for your inquiry. We are working over your query and will get back to you soon.

Best regards,

Hi Kumar,


Thanks for being patient. I am afraid, your test program fails with out of memory error when specifying 1024 mb heap size on my side for both Java version 1.6.0 and 1.7.0 (1.7.0_55). I think, for huge documents, you should specify bigger heap size; for example, please check the following results produced on my side using Aspose.Words for Java 14.8.0:

Aspose product and version is = Aspose.Words for Java : 14.8.0.0
Java version: 1.6.0
Java vendor: Sun Microsystems Inc.
Java arch: amd64
Total count is: 8600
Max heap size: 1820
Total time taken is: 122 seconds
RPE Document used memory (approx) 1234 MB.
Result: C:\Users\Awais\AppData\Local\Temp\testAsposeTotalNumberOfPages_8600_14.8.0.0.doc

Aspose product and version is = Aspose.Words for Java : 14.8.0.0
Java version: 1.7.0_55
Java vendor: Oracle Corporation
Java arch: amd64
Total count is: 8600
Max heap size: 1820
Total time taken is: 122 seconds
RPE Document used memory (approx) 948 MB.
Result: C:\Users\Awais\AppData\Local\Temp\testAsposeTotalNumberOfPages_8600_14.8.0.0.doc

So, this seems to be an expected behavior. If we can help you with anything else, please feel free to ask.

Best regards,

Hi Awais,

You should continue to set max heap to 1024 and decrease count to 8000 or whatever is the max limit it succeeds with JRE 1.6.
If you try with the same limit using JRE 1.7, the document generation fails.

Another difference is the “Java arch”. It’s intel x86 in my case and it’s amd64 for you.

Thanks,
Kumar

Hi Kumar,


Thanks for the additional information. We will test it one more time and get back to you as soon as we can.

Best regards,

Any update on this, Awais?

Hi Kumar,


Thanks for your inquiry. We will test this scenario with the latest version of Aspose.Words 14.9.0 and update you tomorrow. I apologize for the delay.

Best regards,

Hi Kumar,


Thanks for being patient. While using the latest version of Aspose.Words for Java 14.9.0, I managed to successfully avoid out of memory error when specifying 1024 mb heap size on my side for both Java version 1.6.0 and 1.7.0 (1.7.0_55) against 6005 pages. However, JVM threw OOM against 6000 pages in both cases. Could you please also test Aspose.Words for Java 14.9.0 on your environment and see how it goes. I hope, this helps.
http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/default.aspx

Best regards,