Do not compute debug names of reflection objects (#86880)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Tue, 30 May 2023 05:45:14 +0000 (14:45 +0900)
committerGitHub <noreply@github.com>
Tue, 30 May 2023 05:45:14 +0000 (14:45 +0900)
commitda0130194bc47afb7276ab136113d93e956cf208
tree51d952eacf5611d85992d150dbccb544c71d9afa
parent15f5f79950841a42d136692b7a25d1b42feb810a
Do not compute debug names of reflection objects (#86880)

We're spending 5% of Stage2 app startup computing debug names.

This code originates from .NET Native where we had a "release mode with developer experience mode enabled" mode that tried to make troubleshooting trimming issues easier. One of the things it did was providing names of things in the debugger. Since we lack compiler support for this, developer experience mode is always enabled right now.

Since in .NET 5+ people are not supposed to troubleshoot trimming issues in the debugger, this mode doesn't make much sense (we also don't have a managed debugger to surface the `DebuggerDisplay` anyway)
src/coreclr/nativeaot/Common/src/System/Runtime/CompilerServices/DeveloperExperienceState.cs [deleted file]
src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/RuntimeEventInfo.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/FieldInfos/RuntimeFieldInfo.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodInfo.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/PropertyInfos/RuntimePropertyInfo.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.cs