Antaris/RazorEngine

Stop appending GUID string after cleanup app domain name

Yaming-Hub opened this issue · 0 comments

Razor engine will automatically setup a clean up helper app domain to unload files after main app domain is unloaded, the logic is in defined in https://github.com/Antaris/RazorEngine/blob/master/src/source/RazorEngine.Core/Compilation/CrossAppDomainCleanUp.cs class. The problem is, the help app domain name is always "CleanupHelperDomain_" format. Our application will be running on tens of thousands of machines and we use app domain as one dimension to track the memory consumption of each application. Given the help app domain name contains a random GUID every time, it make aggregation become impossible.

The ask is to either remove the random GUID name from from clean up app domain (we can use a hard coded GUID to ensure the uniqueness of the app domain), or make the clean up domain name configurable so that caller can decide what name should be used.