-
-
Notifications
You must be signed in to change notification settings - Fork 939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #395 : SftpClient Enumerates Rather Than Accumulates Directory Items #396
base: develop
Are you sure you want to change the base?
Conversation
… Than Accumulates Directory Items
dc7c792
to
57adbee
Compare
… Than Accumulates Directory Items
Hi, |
This PR is ready to review and approve potentially. |
I like the change, but I don't think we should add a new method for it. Instead, we should just change I also think we should remove the What do you think @WojciechNagorski ? |
My two cents two the discussion regarding changing the internal implementation of the ListDirectory, changing it to use the yield return will certainly break the existing consumer's business logic with the unwritten behavior of returing a complete list in fact. Many of the consumers had already implemented logic such way they are in fact expecting the full list. Therefore, I'd rather suggest changing ListDirectory to return IList interface as part of the major breaking changes and do not introduce the yield return at all. If consumers would like to change the behavior, they can simply change the call from ListDirectory to EnumerateDirectory. |
Regarding the callback, I second that idea, the thread pool may be in excess. I presume the callback was added in order to report the progress and hence, I'm suggesting this may be replaced with |
Hi @drieseng ,
Please, could you check this pull request for #395 ?
The enumerating directory approach has better time results on very huge directorries (a lot of files meaning 80000). In many situations happened the call timed out while using the actual method ListDirectory.
I've also tested in my test environment and the same tests as like in ListDirectory.
Thanks.
Pavel