mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
operations: document multi-thread copy and tweak defaults
This commit is contained in:
@@ -419,16 +419,7 @@ func Copy(ctx context.Context, f fs.Fs, dst fs.Object, remote string, src fs.Obj
|
||||
})
|
||||
}
|
||||
if doMultiThreadCopy(ctx, f, src) {
|
||||
// Number of streams proportional to size
|
||||
streams := src.Size() / int64(ci.MultiThreadCutoff)
|
||||
// With maximum
|
||||
if streams > int64(ci.MultiThreadStreams) {
|
||||
streams = int64(ci.MultiThreadStreams)
|
||||
}
|
||||
if streams < 2 {
|
||||
streams = 2
|
||||
}
|
||||
dst, err = multiThreadCopy(ctx, f, remotePartial, src, int(streams), tr)
|
||||
dst, err = multiThreadCopy(ctx, f, remotePartial, src, ci.MultiThreadStreams, tr)
|
||||
if err == nil {
|
||||
newDst = dst
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user