mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 16:34:30 +01:00
vfs: only calculate one hash for reads
This speeds up mounting on the local backend enormously.
This commit is contained in:
parent
c00dcb7e67
commit
be5392f448
@ -45,7 +45,8 @@ func newReadFileHandle(f *File) (*ReadFileHandle, error) {
|
||||
var err error
|
||||
o := f.getObject()
|
||||
if !f.d.vfs.Opt.NoChecksum {
|
||||
mhash, err = hash.NewMultiHasherTypes(o.Fs().Hashes())
|
||||
hashes := hash.NewHashSet(o.Fs().Hashes().GetOne()) // just pick one hash
|
||||
mhash, err = hash.NewMultiHasherTypes(hashes)
|
||||
if err != nil {
|
||||
fs.Errorf(o.Fs(), "newReadFileHandle hash error: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user