mount: this removes the async buffering as it was killing seek performance

This commit is contained in:
Nick Craig-Wood 2016-12-14 21:15:12 +00:00
parent 442861581a
commit 0117aeafbf
4 changed files with 51 additions and 23 deletions

View file

@ -264,7 +264,7 @@ func Copy(f Fs, dst Object, remote string, src Object) (err error) {
if err != nil {
err = errors.Wrap(err, "failed to open source object")
} else {
in := NewAccount(in0, src) // account and buffer the transfer
in := NewAccountWithBuffer(in0, src) // account and buffer the transfer
wrappedSrc := &overrideRemoteObject{Object: src, remote: remote}
if doUpdate {
@ -1126,7 +1126,7 @@ func Cat(f Fs, w io.Writer) error {
ErrorLog(o, "Failed to close: %v", err)
}
}()
inAccounted := NewAccount(in, o) // account and buffer the transfer
inAccounted := NewAccountWithBuffer(in, o) // account and buffer the transfer
_, err = io.Copy(w, inAccounted)
if err != nil {
Stats.Error()