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

Investigate the need and impact of GC.Collect calls #11373

Open
JanKrivanek opened this issue Feb 3, 2025 · 0 comments
Open

Investigate the need and impact of GC.Collect calls #11373

JanKrivanek opened this issue Feb 3, 2025 · 0 comments

Comments

@JanKrivanek
Copy link
Member

Context

Reported by @davkean:

50% of builds show MSBuild nodes forcing a GC immediately after the build is done. At its worst case, this burned 3 cores for 3 seconds at a time that VS and the user think the build is done and VS is likely launching the app or user back to typing, so not really a good time to consume CPU.
In the few traces I looked at, these reduce memory by practically nothing, unnecessarily promotes, yet takes a long time. Those same sessions show they also have plenty of free physical memory. This GC.Collect should just be deleted and let the GC figure this out. I deleted all GC.Collect's from VS during Dev17 for the same reason.

Goal

Evaluate the impact of keeping versus removing the forced collections (we most likely should not need those, as either the next build call is quickly following, or we'll have the nodes eventually die of anyways).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants