Skip to content

[Performance]: MSBuild.exe spends 300 ms JITting Microsoft.DotNet.MSBuildSdkResolver.dll #9303

@ladipro

Description

@ladipro

Issue Description

We currently load SDK resolvers using Assembly.LoadFrom on .NET Framework, which disqualifies it from using native images even if they existed. We should:

  • Figure out a way to use regular Assembly.Load, e.g. load into a separate appdomain with a generated app config.
  • Make sure the .NET SDK resolver and the NuGet SDK resolver assemblies are added to the NGEN queue by Visual Studio installer and produce usable images.

The potential perf gain is about 300 ms of JITting saved, out of 1100 ms total for a simple app build using MSBuild.exe. It should also lay some groundwork for eliminating another big chunk of JITting: Microsoft.NET.Build.Tasks.dll.

Steps to Reproduce

Collect JIT stats of:

> MSBuild.exe SimpleProject.csproj

Data

image

Analysis

No response

Versions & Configurations

No response

Regression

  • yes
  • no

Regression Details

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions