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

Stop compiling unused shared code into assemblies #5947

Merged
merged 4 commits into from
Aug 6, 2024
Merged

Conversation

zivkan
Copy link
Member

@zivkan zivkan commented Aug 2, 2024

Bug

Fixes: https://github.com/NuGet/Client.Engineering/issues/2950

Description

Stop adding build/Shared/*.cs to all src/ projects, and only include the minimum needed to build each project.

This decreases the size of:
NuGet.exe by about 150kb
NuGet.vsix by about 200kb, and about 500kb when installed/unzipped
I don't have a trivial way to estimate the impact on the .NET SDK, but NuGet.Build.Tasks.Console's bin directory decreased in size by about 600kb

In addition to making it a smaller download for customers when upgrading VS, the .NET SDK, or NuGet.exe (CDN cost savings?), the VS Perf team tells me that it will have a benefit in decreased ngen time after VS upgrades, and that low priority ngen is timeboxed, meaning the less time spent ngen needless NuGet IL, the more time it has to ngen other assemblies before the timeout is reached, and therefore less code missing ngen when VS is actually launched.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests no code changes
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc. no product changes

@zivkan zivkan requested a review from a team as a code owner August 2, 2024 07:22
jeffkl
jeffkl previously approved these changes Aug 2, 2024
Copy link
Member

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be great to get them sorted.
Most of the other items are.

@zivkan zivkan merged commit fe8bab6 into dev Aug 6, 2024
28 checks passed
@zivkan zivkan deleted the dev-zivkan-shared-code branch August 6, 2024 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants