-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Infra: Reduce build time to perform CLR up-to-date check #47022
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
After building with #48044, a release build up-to-date-check using build-runtime.cmd writes no files other than the CMake cache. Some rough numbers with the MSBuild/VS generator on my 8 core machine for an up-to-date check on release x64 fornative builds:
With ninja:
|
Largely 10 seconds are used in invoking MSBuild in 3 invocations:
These could arguably be munged into 1 (max two) calls. |
Are those steps running in incremental builds as well? The version header could presumably have inputs and outputs applied. Restoring via nuget is already incremental so nothing to do there. |
@hoyosjs Looking at the log, when I run
I wasn't expecting us to have to re-link clretwrc. Any ideas? |
Tracked it down I think. Let me test if it's that. |
Hmm. Looks like what I was seeing will only affect non-Windows system. Will try to see where this is coming from. |
Just imaged a brand new machine and was measuring build performance. On a repo with zero changes rebuild of CLR subset is taking over a minute and a half, while build of libs is about 20s. It looks to me like CLR is rebuilding a bunch of stuff. I put up a log at \bvtsrv2\team\ericstj\incremental-build-clr |
Looks like this took a 1:15 |
Before this change, the merged mibc file would inherit the timestamp of the input (which are often days in the past, from the optimization data nuget package). This caused merging to happen on every incremental build, as dotnet-pgo.dll is always newer than the output file. The timestamp was inherited to fix a different incremental build issue, where updating to a newer optimization data package wouldn't make the input timestamp new enough to trigger a re-merge. See #56397 for context. This fixes both issues by caching the input modification timestamps, so that the merged output file will get a new timestamp when it is created, but will be considered out of date whenever the input timestamps change. This reduces incremental build times on my machine by ~3s. Contributes to #47022 Also deletes the --inherit-timestamp logic.
The time being measured is the time needed to build the
clr
subset, after the subset has been completely built already.If this time were low enough, under 5 seconds or so, it would be feasible to add it as a dependency to other subsets. As it is, it takes roughly 51s on my machine.
Ongoing list of work items, to be updated until we're at 5 secons or less:
clr
partitionThe text was updated successfully, but these errors were encountered: