Skip to content

_MvcCopyDependencyFiles Target is showing up on incremental build hot paths #64423

@baronfel

Description

@baronfel

The _MvcCopyDependencyFiles target does a couple things that make it take more time than necessary:

  • The DepsFilePaths Item Group is built up via batching, which is not ideal from a perf perspective
  • The Copy Task is invoked with Batching ("%(DepsFilePaths.FullPath)") which invokes the Task onces for each different item. This is very inefficient
    • It's much more efficient to build up item lists for SourceFiles and DestinationFiles input parameters that explicitly map source to destination by matching position, and to alsp specify SkipUnchangedFiles as true to prevent touching the files on every build, which also causes re-work.

This was found as part of a .NET 10-update analysis for the Copilot team. It's important to fix this because these Targets run for test projects, which are at the 'end' of the build - they are the long tail, and any time spent in them directly extends the overall time of the incremental build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-mvc-testingMVC testing packagepartner-impact

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions