Aspose.Words convert to pdf performance issue

I’m converting several files from source to pdf and getting high conversion times.


I’ve tried it on my Macbook Pro, Amazon Web Services m3.large and c3.large instances which are slower than the Macbook Pro.

15.6.0 File LifeLikeDocument.doc 10.309 seconds
15.7.0 File LifeLikeDocument.doc 9.701 seconds
15.8.0 File LifeLikeDocument.doc 18.918 seconds

The newest version uses less memory from what I can tell but is double the execution time for the same test.


Hi John,

Thanks for your inquiry. I have tested the scenario at Windows and Mac operating systems and following are the results.

Windows 7 and JDK 1.8

Aspose.Words for Java results

v15.8.0 Execution time: 1887 ms
v15.7.0 Execution time: 1625 ms
v15.6.0.0 Execution time: 1596 ms

Mac and JDK 1.7


v15.8.0 Execution time: 6219 ms
v15.7.0 Execution time: 6026 ms
v15.6.0 Execution time: 6572 ms

I have noticed the performance issue at Windows. I have logged this issue as WORDSJAVA-1167 in our issue tracking system. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.

john.patrick3:

I’ve tried it on my Macbook Pro, Amazon Web Services m3.large and c3.large instances which are slower than the Macbook Pro.

15.6.0 File LifeLikeDocument.doc 10.309 seconds
15.7.0 File LifeLikeDocument.doc 9.701 seconds
15.8.0 File LifeLikeDocument.doc 18.918 seconds

Could you please share the Operating System detail e.g RAM, 64/32 bit and Jdk version at which you are testing this scenario?
Production would be Red Hat 6 using Java 8, so that is the key operating system I'm looking at.

The MacBook Pro is;
OS X Yosemite (64bit)
2.8 GHz Intel Core i7
16GB RAM
500GB SSD
JDK 1.8.0_60

Aws Instances, it was in EU (Ireland), probably more useful if you visit amazon for instance specifications (https://aws.amazon.com/ec2/instance-types/). Both instances where the instance with description "Linux/Unix, Red Hat Enterprise Linux 6.5_GA | 64-bit Amazon Machine Image (AMI) | Updated: 11/11/14". Both where running Java 8 with performance when I tried not dropping below 19 seconds.

Hi John,

Thanks for your inquiry. I have tested the scenario at Windows, Mac and Ubuntu operating systems and have not found the shared issue. Following are the results at Ubuntu.

Aspose.Words for Java : 15.8.0.0
Execution time: 1676 ms

Aspose.Words for Java : 15.7.0.0
Execution time: 1653 ms

Aspose.Words for Java : 15.6.0.0
Execution time: 1746 ms

Could you please download the document from this forum thread and test the scenario with this document at your side? This is to make sure that we both are using the same document. Thanks for your cooperation.

I will prepare the required platform (Red Hat 6 using Java 8) to
simulate the environment as of yours. As soon as everything is setup,
we will test the issue at our end and will post the results here for
your kind reference.


Thank you for your patience and understanding.

I’ve download the attached doc and check it’s checksum matches that which I upload and am testing with.


Today I setup a CentOs v6.7 vm

Java 1.7.0_85
Load 3.141 seconds
Save 6.368 seconds

Over the weekend I upgrade my Mac to El Capitan, and results are better, but still no where near your reported 1.x seconds for Windows.

Mac
Java 1.8.0_60
Load 3.449 seconds
Save 7.304 seconds

I'll attach my testing class so you can see all it's doing is loading the saving.

Hi John,

Thanks for your feedback. I have tested again the same scenario (document to Pdf conversion) at Mac operating system and have not found the shared issue. I am using NetBeans 8.0.2 with Jdk 1.8.

Could you please create a simple new application with following code example? Clean the application and execute it and share the results here for our reference.

long start = System.currentTimeMillis();
Document document = new Document(MyDir + "LifeLikeDocument.doc");
document.save(MyDir + "Out.pdf", SaveFormat.PDF);
System.out.println("Execution time: " + (System.currentTimeMillis()-start) + " ms");

Hi John,

Thanks for your interest in our library.

As you probably aware microbenchmarking could be very tricky and not always represent real-world usage patterns.

Wall clock time (java.lang.System.currentTimeMillis()) is strongly affected by other activity on the system, such as background processes, other applications,

disk or network activity, and updates to the display.

If you have some time please have a look at these good articles
http://www.ibm.com/developerworks/library/j-jtp12214/
http://www.oracle.com/technetwork/articles/java/architect-benchmarking-2266277.html
http://nadeausoftware.com/articles/2008/03/java_tip_how_get_cpu_and_user_time_benchmarking

and the video
https://vimeo.com/78900556

Also I recommend you to try JMH

It takes care of many things (e.g. warm up) and it will help you to test throughput and responsiveness with almost no additional effort.

Aspose Words for Java 16.3.0 (Read/Write Document)

JMH (1 thread) average time is ~48 ms / op

JMH (10 threads) average time is ~140 ms / op

Please let us know if we can help with anything else.

Thanks

The issues you have found earlier (filed as WORDSJAVA-1167) have been fixed in this Aspose.Words for .NET 16.8.0 update and this Aspose.Words for Java 16.8.0 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.