SFTP listing is very slow because of the handshake and lack of recursive listing. I know the remote already calls shell functions like md5sum and the like. It would be awesome if it could use a similar call to find so that it can list files and sizes. Or even something like testing if rclone is in the remote $PATH and using that to walk and provide the information.
This would greatly speed up rclone over ssh. And bring the listing more in line with the speed of rsync. (but add all of the great features of rclone such as encryption)
I wonder what an rclone protocol could look like. It would be great to have something like:
$ rclone serve rclone remote:
But you may ask:
Why not serve sftp: (A) Non-http protocol on its own port. Not great behind some firewalls and (b) slow (hence the original issue)
Why not serve webdav: This is promising and faster than sftp but webdav doesn't support hashes or mtimes. It would be great it they update it to do so (there is an issue about this on github...)
But still, my original question stands: Could the SFTP remote be sped up to support recursive listing? At least optionally?