Summary
eng/Build.ps1 unconditionally disables MSBuild node reuse for every Windows build, including local developer inner-loop builds:
# eng/Build.ps1, in Process-Arguments()
$script:nodeReuse = $False;
There is no comment explaining why. It dates back to 7a6448eda0 ("reduce diff") in March 2019, so whatever motivated it is likely long gone.
Note that eng/build.sh does not do this — on Unix, F# already gets Arcade's default (node reuse on for local builds, off on CI). So the two entry points disagree, which suggests the PowerShell side is simply an accident that was never revisited.
Why this matters
Today: node reuse noticeably improves incremental build performance. Without it, every build.cmd invocation pays full MSBuild node startup, JIT and assembly-load cost from scratch. That's a real tax on the inner loop for everyone working on the compiler on Windows.
Going forward: this will block the repo from benefiting from ongoing MSBuild investments. Most importantly MSBuild Server — with node reuse disabled, the server process shuts down immediately after each build, so the repo gets none of the warm-process benefits. MSBuild Server is on by default starting with .NET 10 Preview 7, so this will silently opt dotnet/fsharp's Windows builds out of a headline performance feature.
Suggested fix
Delete the $script:nodeReuse = $False; line and let Arcade's default apply, matching what eng/build.sh already does. If a specific problem resurfaces, please scope the workaround to it and link a tracking issue rather than disabling node reuse repo-wide.
Related
As a stop-gap, dotnet/dotnet#8151 adds a -nodeReuse / --nodeReuse parameter to both entry points so an explicitly passed value wins over the hard-coded disable, letting the VMR turn node reuse on for fsharp. That's a workaround for a workaround, though — the default is what actually matters for the inner loop.
Summary
eng/Build.ps1unconditionally disables MSBuild node reuse for every Windows build, including local developer inner-loop builds:There is no comment explaining why. It dates back to
7a6448eda0("reduce diff") in March 2019, so whatever motivated it is likely long gone.Note that
eng/build.shdoes not do this — on Unix, F# already gets Arcade's default (node reuse on for local builds, off on CI). So the two entry points disagree, which suggests the PowerShell side is simply an accident that was never revisited.Why this matters
Today: node reuse noticeably improves incremental build performance. Without it, every
build.cmdinvocation pays full MSBuild node startup, JIT and assembly-load cost from scratch. That's a real tax on the inner loop for everyone working on the compiler on Windows.Going forward: this will block the repo from benefiting from ongoing MSBuild investments. Most importantly MSBuild Server — with node reuse disabled, the server process shuts down immediately after each build, so the repo gets none of the warm-process benefits. MSBuild Server is on by default starting with .NET 10 Preview 7, so this will silently opt dotnet/fsharp's Windows builds out of a headline performance feature.
Suggested fix
Delete the
$script:nodeReuse = $False;line and let Arcade's default apply, matching whateng/build.shalready does. If a specific problem resurfaces, please scope the workaround to it and link a tracking issue rather than disabling node reuse repo-wide.Related
As a stop-gap, dotnet/dotnet#8151 adds a
-nodeReuse/--nodeReuseparameter to both entry points so an explicitly passed value wins over the hard-coded disable, letting the VMR turn node reuse on for fsharp. That's a workaround for a workaround, though — the default is what actually matters for the inner loop.