Is Aspose.Slides Thread Safe?

We would like to check on a few things regarding Apose Slides for .NET product:

Can we achieve following features using Aspose ?

  1. parsing the slides and extracting title, Comments, Notes etc
  2. Generate a unique code(hash code) for each of the slides
  3. Generate image and thumbnail of each slides.

As of now we are using another component for the parsing. At present, we are facing some serious performance issues with this. Like for the above mentioned process it is taking about 2 seconds per slide. And in the above process the most time consuming ones are generating this unique code(hash code) and creating an image and a thumbnail for each slide. Also this component is NOT thread safe, currently processing each slide we are getting it done in serial. So we would like to check if we move to Aspose, can we have this execution done in parallel. Ie, can we start parsing the each slides simultaneously?

Kindly look into this and give us a response at the earliest

Hi,

I have observed your requirements. I regret to inform that it is not possible in Aspose.Slides yet. A ticket with ID

SLIDESNET-38190 has been created as in our issue tracking system as a new feature request. Our development team will look into the possibility of implementation of the requested feature. This thread has been associated with this new feature request, so that you can be automatically notified as soon as this issue is resolved.

Best Regards,

Hi,

I like to inform that our product team investigated issue on their end and i like to share their findings with you.
You can achieve all things mentioned with Aspose.Slides.

Currently we have ISlide.SlideId property that returns uint identifier of a slide. This Id is unique for each slide inside one presentation, but two slides from different presentations could possibly have the same SlideId. If you need a hashcode identifier like ‘0e7a85dba0d9cd71935b2955fc0946704a4b180f’ unique for slides across different presentations we will add it to the API as soon as we get more details about how this hash should behave:

  1. Should it be changed if the name, number or content of the slide is changed?
  2. Should it be changed if the layout/master slide is changed?
  3. Is there any other things that could affect the calculation?

As for thread safety, Aspose.Slides is not strictly thread-safe. Despite the fact that parallel work with presentation(s) is possible (except for parsing/loading) and most of the times everything looks right, we have that tested and it’s about 0.5% chance to get incorrect result using the actual release of the library in multiple threads. We strongly recommend not to use Aspose.Slides in multi-threading environment, because it can lead to rare but unpredictable artifacts which are not easy to detect. As an alternative solution you can try to parallel your task using several separated single-threaded processes handling entire presentation inside a single process.

On the other hand we’re glad to tell you that performance is one of our priority concerns and our numbers looks much better than 2 seconds per slide. A series of tests on a variety of different presentations shows that the task of loading presentation and generating its slides images is performed with average speed of 0.3 second per slide.

Best Regards,

@ranish,

Can you please share requested information.