You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Slow loading of directory content via SFTP when timeout is set #3506
Directory listing is wery slow when connecting to a SFTP server with CURLOPT_TIMEOUT or -m cmd option. Without a timeout everything works fast.
Tested on my Mac (macos 10.14.2) when connecting to other Mac with curl v7.64.0 (or with daily snapshot 20190129) with following command: curl sftp://<host>/ -m 20 -u <user>
There is some delay for loading of each subdirectory/file.
In curl v7.61.0 the same command performs almost instantly.
After some investigation I found that the bug was introduced with changes to lib/ssh.c in commit 1a89099
Noticed the very same problem and for me it works very slow even without any additional arguments just: curl sftp://<auth>@<host>/
In version 7.61.0 that command takes (for a folder with 4 entries) 0.7s and in 7.61.1 (first affected version) it takes 6.7s for a localhost sftp server.
So there is somewhere an artificial 1 second delay per printed line! Hope this rings some bells...
Please tell how to further narrow this annoying bug. Thanks.
Activity
koskokos2 commentedon Jan 31, 2019
Noticed the very same problem and for me it works very slow even without any additional arguments just:
curl sftp://<auth>@<host>/In version 7.61.0 that command takes (for a folder with 4 entries) 0.7s and in 7.61.1 (first affected version) it takes 6.7s for a localhost sftp server.
manfredsc commentedon Mar 4, 2019
Same for me, 7.61.1 is way slower than version 7.61.0 when doing a simple sftp listing.
The trace-ascii output is exactly the same for both versions.
It seems curl-7.61.1 does exactly one line of print-out per second as one can see with --trace-time:
So there is somewhere an artificial 1 second delay per printed line! Hope this rings some bells...
Please tell how to further narrow this annoying bug. Thanks.
bagder commentedon Mar 4, 2019
I can reproduce. Fix pending.
ssh: loop the state machine if not done and not blocking
manfredsc commentedon Mar 4, 2019
Works for me, version 7.64.0 plus this patch.
Thanks!
bagder commentedon Mar 4, 2019
Thanks for confirming!