When profiling ASP.Net benchmark builds, I found significant time was being spent resolving ExportedType
's since we don't have a cache for those like we do for TypeReference and MethodReference.
Bans MethodReference.Resolve and ExportedType.Resolve and recommend LinkContext.Resolve instead (except in SweepStep).
Adds a cache on LinkContext for resolving ExportedTypes and replaces calls to Cecil's Resolve.
When profiling ASP.Net benchmark builds, I found significant time was being spent resolving
ExportedType
's since we don't have a cache for those like we do for TypeReference and MethodReference.Bans MethodReference.Resolve and ExportedType.Resolve and recommend LinkContext.Resolve instead (except in SweepStep).
Adds a cache on LinkContext for resolving ExportedTypes and replaces calls to Cecil's Resolve.
Replaces some calls to MethodReference.Resolve.
Together with https://github.com/dotnet/linker/pull/3073, performance improves to better than before the virtual method regression in August.
Trimmer CPU milliseconds on ASP.Net benchmarks build: 27325 before the regression related to https://github.com/dotnet/linker/issues/3067 87310 in main 23520 after https://github.com/dotnet/linker/pull/3073 + this change