Free Support Forum - aspose.com

Performance issue in Slides.java

Hi,

I downloaded aspose-slides-15.11.0.jar and trying to execute below program to split ppt into multiple slides. But there is a performance issue. I saw there are posts on performance issue is this solved or is it related to trail version. I also see comments that it is in newer version how can I download earlier version.

test.pptx file size: 97 KB
Total slides: 16
Total time in ms: 81448

public static void main(String[] args) {
try {
long st = System.currentTimeMillis();
FileInputStream is = new FileInputStream(“test.pptx”);
Presentation src = new Presentation(is);
ISlideCollection slides = src.getSlides();
int i = 0;
for (ISlide slide : slides) {
Presentation dest = new Presentation();
dest.getSlides().addClone(slide);
FileOutputStream os = new FileOutputStream(“slide” + (i + 1)
+ “.pptx”);
System.out.println("saving slide " + (i + 1));
dest.save(os, SaveFormat.Pptx);
os.flush();
os.close();
i++;
}
is.close();
long end = System.currentTimeMillis();
LOGGER.info(“TOTAL TIME ms:” + (end - st));
} catch (Exception e) {
e.printStackTrace();
}
}

Hi Sachin,


Thank you for your interest in Aspose.Slides.

I have observed your comments and like to request you to please share with us the source presentation to reproduce the issue so that we may proceed further to help you out.

Best Regards,

Hi Adnan,

Thanks for reply. Please find attached test.pptx I am using.

Hi Sachin,


Thank you for sharing the file with us.

I have observed your comments and like to share with you that I am seeing improved performance while using Aspose.Slides for Java 16.1.0 (see attached image time.JPG). This time involves the time when Document Object Model (DOM) of Aspose.Slides is loaded into memory and then cloning of slides takes some time along with the time when each slide is being saved as an individual presentation. That is why it appears slow but actually these are the steps which are taking time.

I hope this will clarify the concept. Please share if I may help you further in this regard.

Best Regards,

Hi Adnan,

I tried the same scenario using Apache POI and it is much better than Aspose. Apache POI takes ~2sec to process and Aspose takes ~60sec.

Hi Sachin,


I have observed your comments and like to share with you that there are some Java restrictions concerned, and other time consuming factors I have already shared with you. However, we are already working on improving the performance of Aspose.Slides for Java. Its a gradual process and you will observe improved performance with each new version of Aspose.Slides for Java.

I hope this will clarify the concept. Please share if I may help you further in this regard.

Best Regards,

This was posted 4 years ago and I am seeing the same performance issues now in version 20.8. extracting 25 slides takes 60 seconds and it takes 2 seconds in POI.