Skip to content

Conversation

@rainersigwald
Copy link
Member

@rainersigwald rainersigwald commented Dec 20, 2024

It looks like the Setup engine treats all ngened files as DLLs by default, so MSBuild.exe was getting ngened in vsn.exe context, which doesn't make a lot of sense. Explicitly tell the engine to ngen it in its own context.

Notes to January self: look at ngen logs in VS perf tests. Verify

  • no methodsJitted regressions
  • we are no longer ngening these files in vsn.exe context

It looks like the Setup engine treats all ngened files as DLLs by
default, so `MSBuild.exe` was getting ngened in `vsn.exe` context, which
doesn't make a lot of sense. Explicitly tell the engine to ngen it in
its own context.
@rainersigwald rainersigwald self-assigned this Dec 20, 2024
@rainersigwald
Copy link
Member Author

Test insertion: https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/599734

Before (ngen64 log):

01/09/2025 04:35:46.483 [6068]: Executing command from offline queue: install "C:\VisualStudio\MSBuild\Current\Bin\amd64\MSBuild.exe" /NoDependencies /ExeConfig:"C:\VisualStudio\Common7\IDE\vsn.exe" /queue:3

After:

01/09/2025 21:07:36.153 [1188]: Executing command from offline queue: install "C:\VisualStudio\MSBuild\Current\Bin\amd64\MSBuild.exe" /NoDependencies /ExeConfig:"C:\VisualStudio\MSBuild\Current\Bin\amd64\MSBuild.exe" /queue:3

@rainersigwald rainersigwald marked this pull request as ready for review January 10, 2025 12:37
@rainersigwald rainersigwald enabled auto-merge (squash) January 14, 2025 20:49
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@rainersigwald rainersigwald merged commit 6bed355 into main Jan 22, 2025
10 checks passed
@rainersigwald rainersigwald deleted the exp/specify-ngen-app-for-exes branch January 22, 2025 19:47
JanProvaznik added a commit to JanProvaznik/msbuild that referenced this pull request Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants