Memory optimization option

By default GroupDocs.Editor tries to perform computations and complete the task as fast as possible, and if this challenge requires a lot of memory to be used, GroupDocs.Editor does it. However, in some very specific cases, when processing document is very huge, and GroupDocs.Editor works in 32-bit application, which is limited to 2GiB per process, or user machine has very limited amount of free memory, the SystemOutOfMemoryException may occur. In order to solve such problem the WordProcessingSaveOptions class contains the OptimizeMemoryUsage property:

public boolean getOptimizeMemoryUsage()
public void getOptimizeMemoryUsage(boolean)

By default it has a “false” value, which means that the memory optimization is disabled for the sake of the best possible performance. By setting a “true” user can enable another document generating mechanism, which can significantly decrease memory consumption while generating large documents at the cost of slower generation time while performing the `editor.Save() method.

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured Java library we provide simple but powerful free Apps.
You are welcome to edit your Microsoft Word (DOC, DOCX, RTF etc.), Microsoft Excel (XLS, XLSX, CSV etc.), Open Document (ODT, OTT, ODS) and other documents with free to use online GroupDocs Editor App.