File Enumeration very slow

Advertisement

bstock
Guest

File Enumeration very slow

Hi,

I am attempting to use WinSCP in a PowerShell script to connect to and retrieve files via SFTP.

However, any attempts to enumerate files in the remote directory, both via the GUI (when first connecting) or via the DLL (using EnumerateRemoteFiles) is incredibly slow, to the point that it is making it unusable (3+ minutes for a directory containing 15K files).

Connecting to and list the content of the same server and directory using the built-in sftp binary included in Server 2019 takes only 6 or so seconds by comparison.

I have searched the forums and seen various posts about improving speed by using the 'optimise buffer size' option, but the actual connection speed once file transfer is initiated is okay – it is just the enumeration.

I have tried toggling various options on and off, but with no improvement.

Is there any way of further debugging what is going on and any clues as to why this is the case?

Many thanks in advance.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,034
Location:
Prague, Czechia

Re: File Enumeration very slow

Please attach WinSCP session log file. And an output of sftp -vvv doing ls on the same folder.

Reply with quote

bstock
Joined:
Posts:
2
Location:
United Kingdom

Hi,

of course - I should have done that to start with, but thought it might be a 'quick fix' scenario.

WinSCP: 5.19.2, Build 11614
OS: Windows Server 2019 Datacenter (10.0.17763)

This occurs both via GUI and script using the automation DLLs.

Session logs for WinScp and SFTP attached.
Note the WinSCP session log is aborted after 1K or so files as it seemed a little pointless to repeat the whole 17K odd file outputs.

Many thanks.

Reply with quote

bstock
Joined:
Posts:
2
Location:
United Kingdom

Hi, just wondering if there is any thoughts / news on this at all?

Appreciate you are busy covering the requests that come in here, but any indication of whether this is a 'quick fix', or something deeper would be of great help.

Regards.

Reply with quote

Advertisement

You can post new topics in this forum