From b7cba2835db2ddfe605811cbc92195d2bf757a70 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 15 Nov 2022 09:15:31 +0000 Subject: [PATCH] vfs: disable --buffer-size read ahead See: https://forum.rclone.org/t/for-mount-sftp-why-right-click-on-exe-file-is-so-slow-until-it-freezes/33830/52 --- vfs/vfscache/downloaders/downloaders.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vfs/vfscache/downloaders/downloaders.go b/vfs/vfscache/downloaders/downloaders.go index 8d6e90fb2..4509a7d3e 100644 --- a/vfs/vfscache/downloaders/downloaders.go +++ b/vfs/vfscache/downloaders/downloaders.go @@ -288,7 +288,10 @@ func (dls *Downloaders) _ensureDownloader(r ranges.Range) (err error) { // defer log.Trace(dls.src, "r=%v", r)("err=%v", &err) // The window includes potentially unread data in the buffer - window := int64(fs.GetConfig(context.TODO()).BufferSize) + //window := int64(fs.GetConfig(context.TODO()).BufferSize) + + // FIXME test disable --buffer-size window + window := int64(0) // Increase the read range by the read ahead if set if dls.opt.ReadAhead > 0 {