You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this commit adds an optimization of the image copy process on Windows.
It leverages robocopy, when available, which is a file replication tool
built into Windows. By using it we reduce the time to copy of ~40%.
Robocopy is launched with flags:
- /J: Copies using unbuffered I/O (recommended for large files)
- /MT: Creates multi-threaded copies with n threads. Default value of n
is 8
- /R:<n> Specifies the number of retries on failed copies. 0 in this
patch
- /IS Includes Same files, which forces an overwrite even if the destination file appears identical to the source.
Robocopy also uses specific exit code numbers which does not follow
classic values. E.g. exit code 1 means all copies has been completed
successfully. All exit codes are listed at https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy#exit-return-codes
If robocopy is not found on the Win system, it fallback to the old copyFile function.
Signed-off-by: lstocchi <lstocchi@redhat.com>
0 commit comments