Antaris / RazorEngine

Open source templating engine based on Microsoft's Razor parsing engine
http://antaris.github.io/RazorEngine
Other
2.14k stars 577 forks source link

Stop appending GUID string after cleanup app domain name #577

Open Yaming-Hub opened 3 years ago

Yaming-Hub commented 3 years ago

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.