Why does out of memory exception arise on creating or opening large size documents in SfRichTextBoxAdv?
The SfRichTextBoxAdv control keeps the entire rich text contents (text, images, tables, and all other supported elements along with their formatting) of the document and its corresponding information needed for rendering in main memory. In the case of opening a DOCX file, you may think the file size is small, but SfRichTextBoxAdv utilizes very large memory. This is because it is a ZIP archive file with the extension "docx". The SfRichTextBoxAdv control internally decompresses it and populates the content in the document object model, utilizing considerable main memory.
The SfRichTextBoxAdv control supports UI virtualization, where UI elements are created only for the contents visible in the viewer. The UI elements are created for the contents that become visible while scrolling the viewer; this reduces main memory utilization and also improves UI performance. Even though UI virtualization is handled, the main memory utilization will increase with respect to the increase of content and its complexity. The main memory utilized by an instance will not be released until the instance is removed from the document.
Hence, there is a chance for an "Out of memory exception" when the memory utilization exceeds the maximum level as the content of the document increases. Kindly split the contents into several documents or use high-configuration machines with extended RAM to create or open large-size documents comfortably.