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

Free Support Forum - aspose.com

Aspose.Slides load performance

I have a system where I use Aspose.Slides to load presentations from disk and check custom properties.
I do the same thing with Aspose.Words and have noticed that load times when using Slides is much worse. I have now switch to using DocumentFormat.OpenXml instead since performance is about 10 times better with this solution.

That is:
var presentation = DocumentFormat.OpenXml.Packaging.PresentationDocument.Open(file.FullName, false);

Is for my scenario about 10 times faster then doing:
var presentation = new Aspose.Slides.Presentation(file.FullName, new LoadOptions() { OnlyLoadDocumentProperties = true });

How come there is such a large discrepancy in load times?
I have a sample console app that tests load times from Aspose compared to OpenXml with the same files if you can not reproduce this behavior.

Welcome to our community! Thank you for the query. The OnlyLoadDocumentProperties property makes sense if a presentation file is password protected. Please take a look at the API Reference:
LoadOptions.OnlyLoadDocumentProperties Property

You should try to use IPresentationInfo interface as below:

var info = PresentationFactory.Instance.GetPresentationInfo("presentation.pptx");
var properties = info.ReadDocumentProperties();

Documents: Presentation Properties
API Reference: PresentationFactory Class, IPresentationInfo Interface

1 Like

This is indeed much faster. Thank you for pointing me in the right direction! Is there a similar interface for Aspose.Words?

Unfortunately, I cannot answer this question properly. You should ask it on Aspose.Words Product Family forum.