Memory Optimization advise please

Hello,
A duplicated post of:

Memory Optimization advise - Free Support Forum - aspose.com

based on:

https://blog.aspose.com/imaging/controlled-memory-optimization-support-for-loading-images-in-aspose-imaging/

but for Aspose Words:

According to the above, setting

Words.Saving.BlahSaveOptions to True

is ONLY for scenarios when there’s lack of system RAM and files are larger than RAM size, and it will use disk to prevent OutOfMemoryException?

If so, when working with high end systems with large RAM amounts, it’s better to keep MemoryOptimization to False?
Thanks :slight_smile:

@australian.dev.nerds Yes, if you have unlimited memory resources it is better to keep the option in it’s default state, i.e. false. Setting SaveOptions.MemoryOptimization property to true can significantly decrease memory consumption while saving large documents, but at the cost of slower saving time.

1 Like

Thanks, do you want to say it uses a Temp folder on HDD/SSD for operations if MemoryOptimization = True ?

Anyway, do you have a recommended algorithm on when to set it off and when to set it on?
Because the final app will run on many systems from low-end to high-end.
So based on what factors we set it?

I guess the response might be negative, because if otherwise, you would set the property internally and wouldn’t give the option to the developer, but any tip can be helpful :slight_smile:

@australian.dev.nerds

No, temp folder is not used when MemoryOptimization is set to true. Temp folder is used only if it is explicitly set in LoadOptions or in SaveOptions.

Unfortunately, there are no general recommendations. All depends on your needs, document size, complexity and available resources.