Free Support Forum - aspose.com

Performance and Memory Issues using the RenderToGrahics while using Aspose.Slides for .NET

Hi,

after updating to the new version of Aspose I noticed that the current RenderToGraphics, which we are using

slide.RenderToGraphics(false, graphics, width, height);

is marked as obsolete with the information that it will be removed with version 18.6
So I tried to change our code to the following and done a little profiling:

NotesCommentsLayoutingOptions options = new NotesCommentsLayoutingOptions();
options.CommentsPosition = CommentsPositions.None;
options.NotesPosition = NotesPositions.None;
slide.RenderToGraphics(options, graphics);

Performance Issue
Scenario:
Creating Thumbnails for every slide of a presentation with 140 slides only the first slide has content (one shape) all the others only have the title layout of the larissa master defined without content.

Result:
Old Method takes 25 seconds.
New Method takes 2:15 minutes

Memory Issue
Szenario: Using a presentation of one of our customers which has 126 slides and 76MB of size and creating thumbnails for all slides. (Sorry I am unable to provide you with this presentation)

Result:
Old Method: takes 1 Minute and uses up to 300MB.
New Method: I aborted after 5 minutes and only 1/3 of the slides were done. The needed memory was up to 650MB.

Could you please take a look?

Thanks

Best regards
Christopher Black

@blackChristopher,

I have observed the issue shared by you and request you to please share the working sample project along with source presentation reproducing the issue. Please also share the Operating System and machine details used on your end for comparison on our end.

@mudassir.fayyaz,
I attached a zip file with a test presentation and a testprogram.
Switching the statements in line 59 and 60 (one commented out and the other commented in) results in different runtimes for the code.
If the code in line 59 is used it is much faster and uses less memory than if the code in line 60 ist used.

AsposeLOHLeakSentToAspose.zip (2.7 MB)

Best regards Christopher Black

@blackChristopher,

I have observed the issue shared by you and have been able to reproduce the issue specified. An issue with ID SLIDESNET-39902 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

The issues you have found earlier (filed as SLIDESNET-39902) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz