We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Slides Serializes Large Files Slowly

When I have a PPTX file of 400 Mb, Aspose.Slides takes many minutes to create the document object and serialise back to a file. Also, the machine memory quickly maxes out at 8 Gb and stays there for the entirety of processing. This is unusable as requests time out and the end user experience is horrible. How should PPTX of this size be processed? Version 21.9 of Slides used with the test code below. Happy to supply test PPTX file.

        string fileName;
        byte[] fileNameBytes;
        Stream ms;
        fileName = "D:\\Temp\\Latest Products Full.pptx";
        fileNameBytes = File.ReadAllBytes(fileName);
        ms = new MemoryStream(fileNameBytes);
        using (Aspose.Slides.Presentation pres = new Aspose.Slides.Presentation(ms))
            pres.Save(fileName.Replace(".pptx", "_out.pptx"), Aspose.Slides.Export.SaveFormat.Pptx);

@leigh.rowland,
Thank you for contacting support.

There were many updates after version 21.9. Please check your results using the latest version of Aspose.Slides if it is possible. If the issue persists, please share the following data:

  • a storage file link to the presentation file
  • OS version on which the code was run
  • .NET target platform in your app
  • your log data after profiling and diagnostics

@Andrey_Potapov
Thanks for your message. I have tried with Slides 22.3 and same issue. The code is tested using the framework v2 of the Aspose.Slides DLL. The code is complied with framework 4.5 and run on Win 10 i7 processor with 64 Gb memory. The download link for the file is:

Thanks for help

@leigh.rowland,
Unfortunately, I was unable to download the presentation file. Please use another file storage (Google Drive or Dropbox, for example).

If I understand correctly, you are using Aspose.Slides for .NET 2.0. Could you please confirm?

Yes, we are targetting .net 2.0 version of the Aspose.Slides (altough we have also tested against .net 3.5 & 4.0)

Can you try this download link. I have granted this full permission. If it does not work, can you share your email address so I can try a different method

https://nucleuscyber-my.sharepoint.com/:p:/g/personal/leigh_rowland_nucleuscyber_onmicrosoft_com/EQB2Zpzzm9FAj-1GNS8GKK4BMDZtNYJ9-2E66Vv5C53SXQ?e=Hx9ok2

@leigh.rowland,
Thank you for the presentation file. Please collect memory usage data for the test in the environment you described by taking two memory snapshots - before and after loading/saving the presentation, and share a screenshot with Memory Usage and CPU Usage information from your side. But first, please don’t copy the file data to memory as shown in your code example. You should use the code examle for the test like this:

using (Presentation pres = new Presentation("Latest Products Full.pptx"))
    pres.Save("Latest Products Full_out.pptx", SaveFormat.Pptx);

Also, please сalculate exactly how long it took to complete the test.