From da793ac42cfbe5d86e2d6773079800707005fd76 Mon Sep 17 00:00:00 2001 From: goaaats Date: Wed, 22 Jun 2022 02:23:08 +0200 Subject: [PATCH] chore: set COMPlus_ETWEnabled=0 in release builds This might fix extremely bad performance in some algorithms on insider builds --- lib/CoreCLR/boot.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/CoreCLR/boot.cpp b/lib/CoreCLR/boot.cpp index 9e6dbe143..e620f3162 100644 --- a/lib/CoreCLR/boot.cpp +++ b/lib/CoreCLR/boot.cpp @@ -44,6 +44,11 @@ int InitializeClrAndGetEntryPoint( SetEnvironmentVariable(L"DOTNET_legacyCorruptedStateExceptionsPolicy", L"1"); SetEnvironmentVariable(L"COMPLUS_ForceENC", L"1"); +#if NDEBUG + // This might fix extremely bad performance in some algorithms on insider builds + SetEnvironmentVariable(L"COMPlus_ETWEnabled", L"0"); +#endif + wchar_t* dotnet_path; wchar_t* _appdata;