Poor- poor performance since 3.0.0

I’m very dissatisfied with all of the newer versions of the java library.

I have build a drag’n’drop presentation library with an web interface bases on version 2.9.6.
It wasn’t fast but the the performance was acceptable.
Now all operations are slower ( factor 3 ). The Library is not usable anmore.

I did some tests with an “empty” pptx file ( 14kb, 1 master slide with 0 layouts and 0 slides )
to compare both versions. See the result at the end )))-:

Normally a new version should be better, faster, more reliable, more efficient ,… ))))-:

import com.aspose.slides.PresentationEx;
//import com.aspose.slides.pptx.PresentationEx;
import java.util.Date;

public class Start1 extends Thread {
public Start1() {
}
public static void main(String[] arg) {
Start1 start1 = new Start1();
start1.start();
}
public void run() {
try {
Date start = new Date();
PresentationEx presentationEx = new PresentationEx(“empty.pptx”);
Date end = new Date();
System.out.println((end.getTime() - start.getTime()) * 1.0 / 1000);

start = new Date();
PresentationEx presentationEx2 = new PresentationEx(“empty.pptx”);
end = new Date();
System.out.println((end.getTime() - start.getTime()) * 1.0 / 1000);

// time to get dump via jmap
Thread.sleep(1000 * 60);
} catch (Exception e) {
}
}
}

Please take a look at the object table.

NEW version 6.9.1

179931 instances of class com.aspose.slides.Collections.Hashtable$Slot

96779 instances of class com.aspose.slides.c.a.m.ck

69659 instances of class com.aspose.slides.Collections.ArrayList

40971 instances of class com.aspose.slides.ColorFormatEx

40971 instances of class com.aspose.slides.ColorOperationExCollection

40496 instances of class com.aspose.slides.c.a.ak

38078 instances of class com.aspose.slides.c.a.m.gK

23308 instances of class com.aspose.slides.Dj

20736 instances of class com.aspose.slides.Collections.Specialized.ListDictionary

19007 instances of class com.aspose.slides.c.a.m.kf

15050 instances of class Lcom.aspose.slides.Collections.Hashtable$Slot

15004 instances of class com.aspose.slides.Collections.Hashtable

13026 instances of class com.aspose.slides.c.a.m.gP

12291 instances of class com.aspose.slides.c.a.m.gQ

11441 instances of class com.aspose.slides.c.a.m.gt

10469 instances of class com.aspose.slides.c.a.m.kp

9960 instances of class com.aspose.slides.GradientStopExCollection

9952 instances of class com.aspose.slides.GradientFormatEx

9952 instances of class com.aspose.slides.PatternFormatEx

9734 instances of class com.aspose.slides.c.a.m.iI

9298 instances of class com.aspose.slides.c.a.d.i

9294 instances of class com.aspose.slides.c.a.d.f

9066 instances of class com.aspose.slides.c.a.T

8843 instances of class com.aspose.slides.c.a.k.J

8250 instances of class com.aspose.slides.LineFillFormatEx

8250 instances of class com.aspose.slides.LineFormatEx

8012 instances of class com.aspose.slides.Al

7970 instances of class com.aspose.slides.c.a.m.hh

7592 instances of class com.aspose.slides.Lj

6983 instances of class com.aspose.slides.c.a.m.kx

6446 instances of class com.aspose.slides.Collections.SortedList$Slot

instances and memory

class [C] 641431 73038208
class [B] 32114 45708294
class Lcom.aspose.slides.c.a.m.ck; 5539 5764656
class Ljava.lang.Object; 51796 4184456
class [I] 56143 4098108
class java.lang.String 251729 4027664
class com.aspose.slides.Collections.Hashtable$Slot 180054 2880864
class com.aspose.slides.c.a.m.ck 96779 2322696
class sun.util.locale.BaseLocale$Key 55800 2064600
class com.aspose.slides.c.a.m.gK 38078 1675432
class Lcom.aspose.slides.Collections.Hashtable$Slot; 15050 1616944
class com.aspose.slides.ColorFormatEx 40971 1474956
class java.util.HashMap$Entry 47804 1338512
class [Ljava.util.HashMap$Entry; 19824 1189760
class java.util.Locale 55800 1116000
class com.aspose.slides.Collections.ArrayList 69659 1114544
class com.aspose.slides.c.a.m.fA 5383 1098132
class com.aspose.slides.Collections.Hashtable 15004 1080288
class java.util.HashMap 19798 1049294
class [Ljava.lang.String; 33769 939640
class java.util.ArrayList$Itr 38568 771360
class com.aspose.slides.c.a.d.i 9298 678754
class java.math.BigInteger 24071 673988
class com.aspose.slides.c.a.ak 40496 647936
class com.aspose.slides.c.a.m.hY 1669 542425

OLD VERSION 2.9.6

42118 instances of class com.aspose.slides.pptx.ColorTransformEx
41260 instances of class com.aspose.slides.pptx.ColorFormatEx
23452 instances of class com.aspose.slides.pptx.RelativeRectangleEx
15570 instances of class com.aspose.slides.obfuscated.bgt
10012 instances of class com.aspose.slides.pptx.GradientStopsEx
10004 instances of class com.aspose.slides.pptx.GradientFormatEx
10004 instances of class com.aspose.slides.pptx.PatternFormatEx
8282 instances of class com.aspose.slides.pptx.LineFillFormatEx
8282 instances of class com.aspose.slides.pptx.LineFormatEx
8004 instances of class com.aspose.slides.obfuscated.duj
7592 instances of class com.aspose.slides.obfuscated.dib
5080 instances of class com.aspose.slides.obfuscated.bja
5002 instances of class com.aspose.slides.obfuscated.bgk

Class Instance Count Total Size
class Ljava.lang.Object; 64843 6257408
class [B] 8947 6066143
class [C] 72743 5623914
class com.aspose.slides.pptx.ColorFormatEx 41260 1650400
class com.aspose.slides.pptx.LineFormatEx 8282 1026968
class java.util.ArrayList 62684 1002944
class java.lang.String 56960 911360
class [I] 9811 848756
class com.aspose.slides.pptx.GradientFormatEx 10004 760304
class Ljava.util.HashMap$Entry; 12405 708120
class java.util.HashMap$Entry 24012 672336
class java.util.HashMap 12377 655981
class [Ljava.util.Hashtable$Entry; 3268 580080
class [Z] 1811 470094
class com.aspose.slides.pptx.LineFillFormatEx 8282 463792
class java.util.Hashtable$Entry 13986 391608
class com.aspose.slides.pptx.RelativeRectangleEx 23452 375232
class com.aspose.slides.pptx.ColorTransformEx 42118 336944
class com.aspose.slides.obfuscated.duj 8004 320160
class com.aspose.slides.pptx.PatternFormatEx 10004 320128
class java.nio.HeapCharBuffer 7710 285270
class java.lang.Class 1784 271168
class [S] 2825 242970

Hi Thomas,


Thanks for inquiring Aspose.Slides.

I have observed the performance issue shared by you and like to share that we are already addressing this issue on priority basis. We have taken some measures that are in progress and we are hopeful to improve the performance significantly gradually in upcoming few release of Aspose.Slide for Java. I have created an issue with ID SLIDESJAVA-33723 as performance related issue in our issue tracking system to further investigate the issue on our end.

I also like to add further here that there is a great deal of difference between Aspose.Slides for Java 2.9.x series and versions released by Aspose.Slides for Java 3.0.0. The new versions are based on auto porting features from Aspose.Slides for .NET. The auto porting has removed the gap between Aspose.Slides for .NET and Aspose.Slides for Java but there are performance issues that we are focusing on presently. Internally, Aspose.Slides for Java 2.9.x and Aspose.Slides for Java 3.0.0 and on wards are totally different, so one cannot consider them the same. But at the same time I also agree that from customer point of view this thing has to be improved. I highlighted this with you just for sharing the complete picture before you.

I would also request you to please share the complete environment details where by you are using Aspose.Slides for Java along with platform and JDK version used. Please also share if there are any specific settings used on your end. This will help us in investigating the issue further.

We are sorry for your inconvenience,

Hi,


I also have to complain about the performance of the 6.9.1 java version of slides. It really became very slow. It is good to hear that there is work underway to resolve this.

But I also would like to focus on the performance under concurrent operations. The 6.9.1 does not scale - which makes it nearly unusable in a server environment.

There is a empty.pptx attached I used for testing. Just one slide with 2 text fields. Because there is something like a startup time for the slides library, a single read of the pptx is done one time upfront (Also here > 3sec for an empty slide is really horrible…but this is not my issue here).

The only operation performed was to read in the pptx using new PresentationEx(inputstream);

reading pp to heat up…time=3234
starting test run
concurrency level=1, time=510msec
concurrency level=2, time=1092msec
concurrency level=3, time=1913msec
concurrency level=4, time=2963msec

This is run on a 8 core machine linux 64bit ubuntu 12.10 sun java 1.7. 64bit

There was one core fully used for 100% for each concurrency level (level 4 used 4 cores each at 100% cpu).

To sum up:
there were plenty of cpu resources available, but the code scaled like used on a single core.
Expected is that it takes the same time for 4 threads as it takes for 1 thread - as long as there are free cores available. It looks that somewhere is global lock/synchronization happening.

Also, depending on the complexity of the used presentations for the test, there where different kind of exceptions thrown like the following. With higher probability at higher concurrency.
Exception in thread “Thread-2” class com.aspose.slides.c.a.ah: Input string was not in the correct format
Exception in thread “Thread-6” com.aspose.slides.c.a.aL: Arithmetic operation resulted in an overflow.
Exception in thread “Thread-7” com.aspose.slides.c.a.aL: Value too large or too small.

Testfiles and testcase attached.

So my issues are:
* scale with the available cores
* concurrent executions without errors related to synchronization
* misterious start up time of 3sec to read a slide initially

It think all of those go together. Please let me know,
lothar






Hi Lothar,


Thank you very much for the detailed analysis on your end.

I have observed the issues and requirements shared by you. Unfortunately, I don’t have the similar environment available on my end to try to reproduce the issue. I like to share that the issue of more than 3 seconds of start up time is due to factor that Aspose.Slides loads the entire classes of Document Object Model (DOM) in memory . There is an issue with ID SLIDESJAVA-33701 already created to resolve this issue and it is likely to be resolved in Aspose.Slides for Java 7.1.0 which will be released by March 2013.

Based on your observations shared related to threads not using all of the available cores an issue with ID SLIDESJAVA-33751 has been created to further investigate and resolve it.

You have also shared based on complexity of the presentations you have shared the different synchronization issues. Can you please share the sample presentations that you have used to observe concurrent executions without errors related to synchronization. I will investigate them on my end to help you further.

Many Thanks,

The issues you have found earlier (filed as SLIDESJAVA-33723) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

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.
(2)

The issues you have found earlier (filed as SLIDESJAVA-33751) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.