Skip to content

2.5% of CPU time in build is spent evaluating unnecessary Exists() in conditions for a solution-wide design-time build #2534

@davkean

Description

@davkean

This is from this same solution: dotnet/project-system#2789.

By default, MSBuild does not cache Exists checks for the same paths/files, this results in a non-trivial amount of time looking at the disk:
image

Turning on file caching via set MsBuildCacheFileExistence=1 results reduces this from 2.9% to 0.4%:
image

Given it is extremely unlikely that in most builds that evaluation has side-effects - can we please turn on caching by default?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions