GithubHelp home page GithubHelp logo

electronicarts / eacopy Goto Github PK

View Code? Open in Web Editor NEW
236.0 10.0 35.0 793 KB

Robocopy alternative with a bunch of different features

License: BSD 3-Clause "New" or "Revised" License

C++ 98.65% CMake 1.25% Batchfile 0.10%
cpp robocopy

eacopy's People

Contributors

ben-may avatar honkstar1 avatar imi0 avatar jpakea avatar rparolin avatar scuzqy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eacopy's Issues

EACopy 2 times slower than robocopy when copying to empty destination

I compared the performance of EACopy v1.12 and Robocopy on Windows 10 when copying locally 1GB in 10K files (100 files per dir). Here is the code:

$total_bytes = 1000000000
$dirs_cnt = 100
$files_per_dir_cnt = 100

$source = "C:\tmp\sync-test\src"
$destination = "C:\tmp\sync-test\dst"

$cmds = @(
  "robocopy.exe $source $destination /E /NDL /NFL /NP",
  ".\EACopy.exe $source $destination /E /LOGMIN",
  ".\EACopy.exe $source $destination /E /LOGMIN /SYSTEMCOPY"
)

function Prepare-Tree {
  New-Item -ItemType "directory" -Path "$source" | Out-Null
  $contents = "0" * ($total_bytes / $dirs_cnt / $files_per_dir_cnt)
  for ($idx = 1; $idx -le $dirs_cnt; $idx++) {
    New-Item -ItemType "directory" -Path "$source\dir-$idx" | Out-Null
    for ($jdx = 1; $jdx -le $files_per_dir_cnt; $jdx++) {
      New-Item -ItemType "file" -Path "$source\dir-$idx\file-$jdx" -Value $contents | Out-Null
    }
  }
  New-Item -ItemType "directory" -Path "$destination" | Out-Null
}


Remove-Item $source -Recurse -Force
Remove-Item $destination -Recurse -Force
foreach ($cmd in $cmds) {
  Prepare-Tree	
  echo $cmd
  Measure-Command { Invoke-Expression $cmd }
  Remove-Item $source -Recurse
  Remove-Item $destination -Recurse
}

The results showed that EACopy is at least 2 times slower than Robocopy.

Robocopy: 6.45s
EACopy: 12.75s
EACopy /SYSTEMCOPY: 17.00s

Interestingly, when copying 10K empty files ($total_bytes = 0), EACopy is faster. Here are the results:

Robocopy: 4.23s
EACopy: 2.67s
EACopy /SYSTEMCOPY: 3.22s

I obtained similar results on a couple of machines.

Why is EACopy slower when copying non-empty files?

Level: robocopy vs eacopy

C:\SOURCE
└── MEH

robocopy C:\SOURCE D:\BACKUP\SOURCE /e /xf * /lev:1

D:\BACKUP
└── SOURCE

but

eacopy C:\SOURCE D:\BACKUP\SOURCE /e /xf * /lev:1

D:\BACKUP       
└── SOURCE   
    └── MEH

Why eacopy does not respect lev switch here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.