Update List of Assemblies to Crossgen#9635
Conversation
|
@pranavkm, this may improve some of the ASP.NET build scenarios you're looking at. |
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\**\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\netcoreapp*\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tools\netcoreapp*\**\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\net6.0\**\*" /> |
There was a problem hiding this comment.
Would it help if we put these in a netcoreapp directory? That way we wouldn't have to worry about updating these every major release. The TFM version isn't really useful to the SDK
/cc @captainsafia
There was a problem hiding this comment.
Could be worthwhile from a maintenance perspective. I suspect that we're going to need to do something to catch new additions to the SDK (likely a test that looks for new non-crossgen'd assemblies), and so it may not be immediately necessary, but if this validation becomes costly or difficult, then renaming the directory could be a good way to ensure that things don't break going forward.
There was a problem hiding this comment.
It's not incredibly difficult to fix up the SDK to produce fixed paths, but I think adding a check would be a better approach.
|
@marcpopMSFT, can you recommend someone to review this please? |
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\**\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\netcoreapp*\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tools\netcoreapp*\**\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\net6.0\**\*" /> |
There was a problem hiding this comment.
It's not incredibly difficult to fix up the SDK to produce fixed paths, but I think adding a check would be a better approach.
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\netcoreapp*\**\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.ILLink.Tasks\tools\net5.0\**\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\net6.0\**\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web\analyzers\cs\**\*" /> |
There was a problem hiding this comment.
That's a good question. If they run in VS, then probably not. I'll remove this one.
There was a problem hiding this comment.
Do you think it would be useful to multi-target these assemblies to allow the files to be crossgened? They appear in every compilation for a webapp
There was a problem hiding this comment.
Do you have a trace where these show up? It just depends on how much JIT time shows up.
There was a problem hiding this comment.
It should show up as part of Csc, but I don't have one off hand.
There was a problem hiding this comment.
I will take a look at the amount of JIT time that comes from these, and report back. Thanks for pointing this out.
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\net6.0\**\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web\tools\net6.0\**\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\tools\net6.0\**\*" /> | ||
| <RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Worker\tools\net6.0\**\*" /> |
There was a problem hiding this comment.
These are oddly specific version folders
There was a problem hiding this comment.
The reason that the version is present is because many of these have a net472 version, and those should not get precompiled.
|
How much does this bloat the installer in terms of number of files/size? |
|
@joeloff, this does not impact the number of files, it just precompiles files that are already included in the SDK. Here is a before and after comparison of size: Zip File:
Extracted:
I would consider this a reasonable increase given the improvement that comes with it. |
|
@brianrob I thought there might be more files, but the increase seems very reasonable. We're doing triage on Wednesday, okay if we merge then or is this blocking anything? |
|
Not blocking. Wednesday is great. Thank you! |
Contributes to dotnet/sdk#15558.
Context
The installer is responsible for precompiling the libraries that compose the final SDK. Over time, several new SDKs have been added, and several have been upgraded, which has resulted in a number of SDK assemblies that are not pre-compiled, and thus contribute to higher JIT times and overall wall-clock latency.
Changes Made
Updated paths to assemblies in crossgen.targets that contain assemblies that should be pre-compiled.
Testing
Notes
This PR contains the following performance wins:
I have filed #9634 to track work to catch this if/when it happens again.
cc: @stephentoub, @DamianEdwards, @marcpopMSFT