Free Support Forum -

Load presentation

Hi i have some questions regarding aspose slides. I need to lower memory occupation when loading big presentation. I found IBlobManagementOptions that should decrease memory occupation but it doesn’t seem to work, when i run this code with this presentation
no temp files are created even tho i think it should be and no memory is saved. Can you help me figure out this:

 LoadOptions loadOptions = new LoadOptions();

    IBlobManagementOptions iBlobManagementOptions = new BlobManagementOptions();





    Presentation presentation = new Presentation("C:\\Users\\nsaric\\Desktop\\big.pptx",loadOptions);

Is there anything else i can do to lower memory occupation?



When you load the presentation using Aspose.Slides, it gets loaded in Document Object Model (DOM) of Presentation using Aspose.Slides. The entire presentation is loaded inside memory. The amount of memory consumed is directly proportional to size of presentation, number of slides, number of shapes, types of shapes like charts, tables and SmartArt, and multimedia content inside presentation. There is no option to partially load the presentation or reduce the size in memory. What’s available in presentation will fill it up in DOM of presentation. I hope the shared elaboration will be helpful.

I see but i load options we can do this
if I set property IsTemporaryFilesAllowed to true. This property defines if temporary files can be created while working with BLOBs, what greatly decreases the memory consumption.
BLOB can be an audio, video or presentation itself but its not working. but temp files are not created and i think that they should be.

Can you help me figure it out



Can you please check what is his limits for memory usage? We consider that 515Mb is OK for the whole process. Without BLOB LoadOptions options set, the RAM required to load this presentation (“big.pptx”) is 1.35Gb.

For .NET (example is for Java) the following code takes 515Mb RAM to load Presentation:

LoadOptions loadOptions = new LoadOptions
    BlobManagementOptions = new BlobManagementOptions
        PresentationLockingBehavior = PresentationLockingBehavior.KeepLocked,
        IsTemporaryFilesAllowed = true,
        MaxBlobsBytesInMemory = 10  1024  1024 // 10Mb