vigoo/bari

Minimise file system level copy operations

vigoo opened this issue · 0 comments

To improve the build performance, we'll introduce a virtual file system (based on of the already existing IFileSystemDirectory abstraction) with the following properties.

  • Copy and move operations are recorded but not performed, until:
    • Explicit call to the Materialize() function on the directory
    • The source file is being modified/deleted
    • The source directory is marked as unstable
  • Chained copies, moves, deletion and reading do not require materialisation, it is handled correctly by the VFS
  • Tasks running external commands (such as MSBuild) must materialise their source directories before execution, and mark their target directories as unstable.
  • The final target directory must materialised at the completion of the command.

The expectation is that ContentBuilder, MergingBuilder, CopyResultBuilder will chain their virtual copy operations and it will only materialise in a single copy from the source/cache to the product target directory.