Memory optimization option

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Editor MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-editor -- dnx GroupDocs.Editor.Mcp --yes
Folders, licensing and more →

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 bool OptimizeMemoryUsage { get; set; }

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.