-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve SDK incremental builds by not running redist-installer layout generation on inner loop builds #44687
Conversation
for any given ci job, Microsoft.NET.Publish.Tests.dll is the slowest to complete (3-4x worse than the others, combined). there may be redundancies to clean up or merge tests to improve its timings |
@kasperk81 this is specifically not about CI jobs, though if you wanted to dig into that it would be welcome! This is about trying to reduce cycle times for local builds. |
i saw that :) just sharing another pain point that we have to wait for that slowest test suite to finish to see the test results. |
Ok, this one is slightly less performant (~43s inner loop on my machine) but it keeps the overall generate layout pathways working (so tests and such for the installer should be usable). Instead, we now also set DISABLE_CROSSGEN to prevent the crossgen targets from being run. Since crossgen is in-place updating the binaries, this requires no other changes to the layout targets. The next target would be the OverlaySdkOnLKG target, which on my machine takes 12s (of the 43), but we can get to that in later PRs. |
aa1bd94
to
afb0c4d
Compare
@baronfel merge and then backport to 9.0.1xx? |
/backport to release/9.0.1xx |
Started backporting to release/9.0.1xx: https://github.com/dotnet/sdk/actions/runs/11728595571 |
@SimaTian reported very long incremental build times, and @ViktorHofer pointed out it's because Crossgen was being run even on builds where the installer was not packaged (aka builds where
-pack
was not passed). While we condition several of the packaging-related redist-installer target imports onPackInstaller
conditions, Crossgen was not. However, simply conditioning the Import of the Crossgen.targets wouldn't work, because merely building redist-installer.csproj was invoking Crossgen.One potential solution is to not call the redist-installer's layout logic unless building installers, but there are probably other approaches that could be taken as well.
Simply not doing these layouts results in incremental builds that take 30s on my machine.