electronicarts / eacopy Goto Github PK
View Code? Open in Web Editor NEWRobocopy alternative with a bunch of different features
License: BSD 3-Clause "New" or "Revised" License
Robocopy alternative with a bunch of different features
License: BSD 3-Clause "New" or "Revised" License
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?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.