Cloning slides very slow and inconsistent

I am in the process of evaluating Aspose.Slides as a replacement for Apache POI and I’m finding that it takes a very long time to copy slides from one presentation to another. I am moving them or cloning them within the same presentation whenever possible since that is much faster but there are times I have to copy them from one presentation to another and it can take as long as 20 seconds to clone a single slide. On average it seems to take about 2-3 seconds per slide with some happening in under a second and many taking over 10 seconds. The other thing is that it can vary greatly, I can merge the exact same slides and sometimes it will take 5-10 times longer then other times. These can be fairly large and complex presentations (200-300 slides with embedded worksheets, charts, etc.) and at times I may need to create a new presentation with a bunch of slides from several different presentations. I have an algorithm to try and decide if it will be faster to start with a new presentation or to copy the one with the most slides being merged, move the slides I want to keep and delete the rest, but even this can be very slow and it is hard to tune the algorithm since the timings vary so much. It can take 15-20 seconds to remove 100-200 unused slides from the copied presentation as well. I’m running the latest version of Aspose.Slides (20.8) on Java version 1.8 on a Wildfly 16 server.

@mike.geier

Slide cloning is one of resource eating process both in terms of memory and computation. It depends on number of slides inside presentation, number of shapes inside slides, content inside slide especially multimedia content, charts and tables. You can improve the performance by increasing the heap size as entire DOM is loaded in memory. Apparently, few MB seeming presentation consumes hundreds on MBs in memory when its DOM get extracted.

You can please consider increasing the heap size and if still you consider a performance related issue, please share the working sample code, source file, statistics achieved along with machine specifications on your end. We will consider that on our end to verify if the amount of resources consumed is justified or there is room of improvement in this.