I am using the following code to open a presentation:
long start = new Date().getTime();
_presentation = new PresentationEx(fileName);
long end = new Date().getTime();
System.out.println("Took: " + (end - start) + “ms”);
On my Core i5 / 8 GB RAM Notebook with 64 Bit Java 7 SE Update 11 this outputs Took: 4282ms which is way too long. This is just an example of the overal bad performance. Saving to pptx or pdf as well as generating thumbnail images is just as bad or even worse.
The (empty) presentation referenced in fileName is attached. It is the empty default presentation of my german Powerpoint 2010.
Is there any way to improve performance by a huge margin, say at least 400%? Otherwise the library would not be usable for our purposes.
I can add some further investigation results:
I suspect the classloader is the problem. On the second execution of the same code within the same VM the performance rises by over 1000% to ~400 ms
Why does the library need to load over 3700 classes? This is extremely inefficient.
Hi Patrick,
Hi Mudassir,
the code of the second scenaro is:
long start = new Date().getTime();
PresentationEx presentation1 = new PresentationEx(fileName);
long end = new Date().getTime();
System.out.println("1st took: " + (end - start) + “ms”);
start = new Date().getTime();
PresentationEx presentation2 = new PresentationEx(fileName);
end = new Date().getTime();
System.out.println("2nd took: " + (end - start) + “ms”);
Displays on my device:
1st took: 4836ms
2nd took: 457ms
Hi Patrick,
In addition the memory overhead is very large.
Hi Shaun,
The code in my example was the actual code I used (did not open any file). The 200MB usage was observed just by creating a default PresentationEx instance and writing it to the file system.
Hi Shaun,
I have attached a screenshot from the profiler. Note that peak memory use was 238MB. I am using JDK 1.6.0_33.
As a point of comparison, Aspose.Cells uses 35MB of heap memory running a similar test (creating an empty workbook and saving).
Hi Shaun,
The latest version still has huge memory and performance issues. It’s clear that your auto-port process is creating highly inefficient code.
The issues you have found earlier (filed as SLIDESJAVA-33701) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.