rclone/vfs/vfscache
Nick Craig-Wood 652d3cdee4 vfs: windows: fix slow opening of exe files by not truncating files when not necessary
Before this change we truncated files in the backing store regardless
of whether we needed to or not.

After, we check to see if the file is the right size and don't
truncate if it is.

Apparently Windows Defender likes to check executables each time they
are modified, and truncating a file to its existing size is enough to
trigger the Windows Defender scan. This was causing a big slowdown for
operations which opened and closed the file a lot, such as looking at
properties on an executable.

See: https://forum.rclone.org/t/for-mount-sftp-why-right-click-on-exe-file-is-so-slow-until-it-freezes/33830
2022-11-14 17:05:51 +00:00
..
downloaders rcat: preserve metadata when Copy falls back to Rcat 2022-11-10 12:04:35 +00:00
writeback all: fix spelling across the project 2022-08-30 11:16:26 +02:00
cache_test.go all: fix spelling across the project 2022-08-30 11:16:26 +02:00
cache.go build: reformat comments to pass go1.19 vet 2022-08-05 16:35:41 +01:00
item_test.go Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
item.go vfs: windows: fix slow opening of exe files by not truncating files when not necessary 2022-11-14 17:05:51 +00:00