Skip to content

Commit

Permalink
Switch to full NGEN (#6764)
Browse files Browse the repository at this point in the history
Context
We are currently pre-compiling only code that gets executed as part of our IBC training scenarios. This results in smaller native images but the coverage is not perfect and it's easy to miss a code path and cause JITting at run-time.

Changes Made
With Visual Studio switching to 64-bit, address space is no longer a concern and the positive impact of pre-compiling everything outweighs the cost of larger image sizes.

Testing
Experimental VS insertion showing improvements in # of methods JITted and wall-clock time.
  • Loading branch information
ladipro authored Aug 27, 2021
1 parent 1630763 commit 414393f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Build/Microsoft.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<IsPackable>true</IsPackable>
<PackageDescription>This package contains the $(MSBuildProjectName) assembly which is used to create, edit, and evaluate MSBuild projects.</PackageDescription>
<IncludeSatelliteOutputInPack>false</IncludeSatelliteOutputInPack>
<ApplyNgenOptimization Condition="'$(TargetFramework)' == '$(FullFrameworkTFM)'">partial</ApplyNgenOptimization>
<ApplyNgenOptimization Condition="'$(TargetFramework)' == '$(FullFrameworkTFM)'">full</ApplyNgenOptimization>

<!-- Do not generate a warning that our 'stable' package should not have a prerelease dependency. -->
<NoWarn>$(NoWarn);NU5104</NoWarn>
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/Microsoft.Build.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<IsPackable>true</IsPackable>
<PackageDescription>This package contains the $(MSBuildProjectName) assembly which is a common assembly used by other MSBuild assemblies.</PackageDescription>
<IncludeSatelliteOutputInPack>false</IncludeSatelliteOutputInPack>
<ApplyNgenOptimization Condition="'$(TargetFramework)' == '$(FullFrameworkTFM)'">partial</ApplyNgenOptimization>
<ApplyNgenOptimization Condition="'$(TargetFramework)' == '$(FullFrameworkTFM)'">full</ApplyNgenOptimization>

<!--
Ignore warnings for nullable annotations in code that doesn't use '#nullable'. Microsoft.CodeAnalysis.Collections
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Microsoft.Build.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<IsPackable>true</IsPackable>
<PackageDescription>This package contains the $(MSBuildProjectName) assembly which implements the commonly used tasks of MSBuild.</PackageDescription>
<IncludeSatelliteOutputInPack>false</IncludeSatelliteOutputInPack>
<ApplyNgenOptimization Condition="'$(TargetFramework)' == '$(FullFrameworkTFM)'">partial</ApplyNgenOptimization>
<ApplyNgenOptimization Condition="'$(TargetFramework)' == '$(FullFrameworkTFM)'">full</ApplyNgenOptimization>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/Microsoft.Build.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<IsPackable>true</IsPackable>
<PackageDescription>This package contains the $(MSBuildProjectName) assembly which is used to implement custom MSBuild tasks.</PackageDescription>
<IncludeSatelliteOutputInPack>false</IncludeSatelliteOutputInPack>
<ApplyNgenOptimization Condition="'$(TargetFramework)' == '$(FullFrameworkTFM)'">partial</ApplyNgenOptimization>
<ApplyNgenOptimization Condition="'$(TargetFramework)' == '$(FullFrameworkTFM)'">full</ApplyNgenOptimization>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 414393f

Please sign in to comment.