Free Support Forum -

Slides and Memory Usage

After using Slides to convert PPT to PDF, after completion I can see a lot of slide-related classes in my JVM heap.

Here is my Java code for doing the document conversion:

public void convert((final InputStream is, final OutputStream os) throws Exception {
Presentation doc = new Presentation(is);, SaveFormat.Pdf, PDF_SAVE_OPTIONS);

I’ve attached two heap dumps, 5 minutes apart. As far as I am concerned, all the operations have finished and the input and output streams have been closed.

Any help or insight appreciated. I assume some of this is related to class loading (e.g. fonts). But I just want to confirm I am not doing anything wrong in the save process or need to call anything afterwards.


Thanks for inquiring Aspose.Slides.

I have observed the information shared by you and like to share that the amount of memory consumed during loading the presentation in Document Object Model (DOM) of Aspose.Slides and its rendering to PDF depends upon the size of presentation, number of slides and content inside the presentation. If there is more multimedia content inside the presentation then it will be consuming more memory in ram and also during rendering to PDF additional memory will be consumed. Also, we are continually improving the API performance and it will be improved in subsequent product releases as well.

I request you to please try using Aspose.Slides for Java 15.5.1 on your end. If you still feel there is performance issue, please share the new stats along with source presentation, generated output and sample code with us. I will investigate that further on my end to help you out.

Many Thanks,

Hi thanks for the reply.

My question refers to the memory consumption AFTER rendering and the sort of artefacts left in memory after the rendering has finished and the document streams closed.


I like to share that the calling the method will save the presentation either on disk or some memory stream. However, the memory consumed by DOM of Aspose.Slides will still be consumed until or unless the Presentation object is set to null or cleared. You can still work with Presentation even after calling the save method.

Many Thanks,