The application you have shared is an
ASP.NET web application that renders the document and displays it in the browser. It would not be incorrect if we say that there are multiple factors that may be involved in resource consumption, for example, how the API is used in the application, the other operations that are being performed in the application, and so on. Therefore, to better analyze the memory and CPU consumption of the API and to check if there is any memory leak, we should use a standalone application.
For this, we have created this sample console application that can be used to analyze the memory and CPU consumption of the API while it renders multiple documents simultaneously. You can try it at your end by putting your eml files in the bin/debug/storage folder. To meet the workload of your scenario, you can vary the number of files in the storage folder. Please try and share your outcomes with us.