Topic "Slow ListDirectory Method"

Author Message
bobmcrae
[View user's profile]

Joined: 2015-03-06
Posts: 5
Location: United States
I am currently using the .NET COM assembly and the ListDirectory method, recursively. I am finding that its performance is pretty slow (in directories with NO symbolic links). I am wondering whether the command line scripting approach could offer faster performance in a recursive directory listing. The one issue I am not sure how to address is that I cannot perform (or don't know how) the recursion within a WinSCP script. Therefore, it would seem I would need to create a new session for each directory recursion, which defeats the performance objectives.

Any ideas?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
You can do the recursions over a single session using techniques described in this article:
https://winscp.net/eng/docs/guide_interpreting_xml_log

But you will end up doing what the .NET assembly does for you. So it's pointless.

Please attach a full debug log file showing the performance problem (using the latest version of WinSCP).

To generate log file, set Session.DebugLogPath. Submit the log with your post as an attachment. If you do not want to post the log publicly, you can mark the attachment as private.
bobmcrae
[View user's profile]

Joined: 2015-03-06
Posts: 5
Location: United States
Thanks for the fast response and thoughtfulness Martin. I have tried another client that offers recursion (lftp on a linux box) and see the same issue. It seems that changing directories comprises the main performance hit. So, I suspect that even using scripting would result in the same issue. In my case, I often have just 1-2 files per directory, so I have to traverse each one looking for new files. Even a mask would not work, because the timestamp on the directory remains unchanged, when a new file is deposited or changed.

I am particularly impressed with Windows tree command and its speed, even traversing directories. If I had more access to the FTP server's OS, I might be able to do a tree, but I don't.

I think what I might need to do -- if faster performance is necessary -- is to run a nightly batch and create a tree file for each account.

Thanks again, for your response and your excellent work on WinSCP.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License