Skip to content
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

Build Acceleration - Default to On #9106

Closed
10 of 11 tasks
kvenkatrajan opened this issue Jun 20, 2023 · 6 comments
Closed
10 of 11 tasks

Build Acceleration - Default to On #9106

kvenkatrajan opened this issue Jun 20, 2023 · 6 comments
Assignees
Labels
Feature-Build-Acceleration Build Acceleration can skip calls to MSBuild within Visual Studio Performance-Scenario-Build This issue affects build performance. Tenet-Performance This issue affects the "Performance" tenet. Tracking Tracking a bug against another repo or a larger thematic issue tracking a group of work. Triage-Approved Reviewed and prioritized
Milestone

Comments

@kvenkatrajan
Copy link
Member

kvenkatrajan commented Jun 20, 2023

Summary

In 17.5 Build Acceleration was released as an opt in feature and this had significant impact on build performance as detailed in the discussion board
Next Step is to turn this on by default.

Considerations

  • Ability to turn on feature flag remotely and measurably increase the span of audience
  • Iron out any devbox implications
  • Identify installer projects and disable
  • Identify true impact on pre/post build

User Impact

~80% increase in build performance:

Tasks

@kvenkatrajan kvenkatrajan added Tracking Tracking a bug against another repo or a larger thematic issue tracking a group of work. Feature-Build-Acceleration Build Acceleration can skip calls to MSBuild within Visual Studio labels Jun 20, 2023
@kvenkatrajan kvenkatrajan changed the title Build Acceleration - Turn on by Default Build Acceleration - Default to On Jun 20, 2023
@tmeschter tmeschter added the Triage-Approved Reviewed and prioritized label Jun 22, 2023
@kvenkatrajan kvenkatrajan added this to the 17.8 milestone Jun 30, 2023
@drewnoakes drewnoakes added Tenet-Performance This issue affects the "Performance" tenet. Performance-Scenario-Build This issue affects build performance. labels Jul 24, 2023
@LevYas
Copy link

LevYas commented Dec 26, 2023

Hi, thanks for the improvement. In which version of VisualStudio it is set to ON?
I try to understand, whether I still need to specify the acceleration per project or not.

@kvenkatrajan
Copy link
Member Author

hi @LevYas thanks for your interest. This has been turned on by default in 17.9 release for sdk style (.NET core) projects.

@govert
Copy link

govert commented Mar 5, 2024

The default setting for build acceleration changed in VS 17.9 (according to the last internal VS check-ins referenced in this issue). We are building SDK-style projects that target .NET Framework, and for our projects this update turned out to be a surprising and hard-to-track-down breaking change. (Even though the previous comment suggests it changed for "sdk style (.NET core) projects", our sdk style (.NET Framework)" project was affected.) The default changed with no indication in the Visual Studio release notes.

The behavior of the "FastUpToDate" build is different to the normal MSBuild in that additional transitive dependencies are copied to the output, where MSBuild would not copy these files. With build acceleration on, the extra files will be copied to output when either doing "Build" or starting to debug, which both trigger the "FastUpToDate" build and hence the extra copy. When doing a "Rebuild" or building after changes, the real MSBuild build is run, which does not copy the extra files. This is even more confusing, since extra files will remain in the output until manually deleted ("Clean" runs MSBuild, which will not remove the extra files).

Whether the extra files should be there or not is another matter, but having these two incompatible build behaviors is very confusing. In our case these files were not used, but broke things at runtime.

Furthermore, there are now two settings in Visual Studio with unclear interaction.

  • Tools -> Options -> Environment -> Preview Features -> Enable Build Acceleration By Default
  • Tools -> Project and Solutions -> SDK-Style Projects -> Up to Date Checks

in additional to the explicit project property <AccelerateBuildsInVisualStudio>.

It would be helpful to clean up and document these options, and to document this breaking change in the release notes for Visual Studio.

Finally, it would be helpful to know why the build behavior is different (why additional files are copied as part of the "FastUpToDate" build which would not be copied by a real MSBuild build). Even if there is an argument for why these files should be in the output, neither MSBuild builds nor previous Visual Studio version would put them there. One would expect the accelerated build in Visual Studio to only be an optimization and not introduce changed behavior.

@drewnoakes
Copy link
Member

@govert we definitely want parity between MSBuild and Build Acceleration. Could you verify whether the issue you're seeing is the same as #9001 or #8728? If not, please file a new issue and include enough information to repro the problem, so we can investigate. Thank you and sorry for the trouble here.

@Maintenance-Partnership-Systems

Hmm. I think I just opened another issue that relates to this topic - see #9416 (comment)

@govert
Copy link

govert commented Mar 12, 2024

@drewnoakes I've tried to write up our case in #9417
It's not exactly the same as the other issues, though it does fall in the category of 'gathering copy items'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Build-Acceleration Build Acceleration can skip calls to MSBuild within Visual Studio Performance-Scenario-Build This issue affects build performance. Tenet-Performance This issue affects the "Performance" tenet. Tracking Tracking a bug against another repo or a larger thematic issue tracking a group of work. Triage-Approved Reviewed and prioritized
Projects
None yet
Development

No branches or pull requests

6 participants