mirror of
https://github.com/rclone/rclone.git
synced 2026-05-12 10:03:35 -04:00
Add a configurable grace period (default 5s) that delays closing file handles and downloaders when the last handle closes. If a new handle opens within the grace period, it reuses the existing resources. This fixes 40x performance degradation with serve nfs vs serve sftp caused by go-nfs opening/reading/closing on every NFS READ RPC, which destroyed read-ahead prefetch before it could accumulate. The grace period only applies to non-dirty files so that writeback proceeds immediately on close. Fixes #9251