Improve ProjectRootElementCache caching strategy
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
`ProjectRootElementCache.DiscardImplicitReferences` is always called (directly or indirectly) from `BuildManager.BeginBuild`. The implicit references will be all the `.props` and `.targets` files imported by a project. These should be the project files that are most likely to be shared between different projects, so it seems counterproductive to force them to be ejected from the cache for each build.
With the Chromium solution (which has ~3500 projects), disabling the calls to `DiscardImplicitReferences` improved the time until Visual Studio finished initializing the projects from 18 minutes to 13.5 minutes on the PC I was using to test it.
While this is a great improvement, we need to understand if there is a good reason that the implicit references are being discarded, or if keeping them is likely to negatively impact other scenarios.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.