[DevExpress Support Team: CLONED FROM T637942: HTML5 Document Viewer - ArgumentOutOfRangeException is thrown if the AzureWebDocumentViewerContainer.UseAzureEnvironment method is called after the upgrade to v18.1]
We made the changes to UseFileDocumentStorage method and it's creating the files, but also the memory is still growing too much. What should we do to liberate the memory?
Note that the report's document generation process requires some amount of memory for report generation. Usually, the more pages and graphical resources (charts, images, barcodes, etc.) your report contains, the more memory will be required to generate a document for this report. So, the simplest way to reduce the memory usage is to reduce the number of pages in the previewed report's document. For example, you can use the data filtering functionality in your reports.
When the report is previewed in the HTML5 Document Viewer component, it is saved to an in-memory cache for one minute each time after a document is created or restored from the Azure Cloud or the Filesystem storage. Cache clearing settings can be configured by using CacheCleanerSettings. Check the Registering Services in the Document Viewer help topic for more information on how to modify these settings. Also, you can call the client-side Close method for the HTML5 Document Viewer component when the page/tab with the report preview is closed to dispose of the memory allocated by the report immediately. Check the WebDocumentViewer - XtraReport memory utilization is high thread for more information regarding this.
Finally, I would like to note that starting with version 18.1, we provide the new CachedReportSource component that is designed to improve the performance and memory handling while working with large reports. Check the Reporting - Document Generation Performance Improvements (v18.1) blog post for more information regarding this. You can try using this component in your application to reduce the memory usage.