-
Notifications
You must be signed in to change notification settings - Fork 8.1k
WIP: Add progress to FileSystemProvider for Copy-Item
#18728
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
Conversation
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
for me there is far to much movement in the UI for this to be of any use |
|
Nice. I was a little worried that this would impact the performance, but I tested it with a lot of small files (2.4GB, spread across 8613 files) and the performance stayed the same (around 8.8 seconds). Robocopy is still faster at around 6.1 seconds but that's hard to compete with. |
|
The initial copy found a bunch of hash files in the "hidden" |
|
It seems to me that such things are not useful in the sense that they do not solve the problems that they should. The main thing the progress bar is for is the frozen screen. When a user gets worried that the process is frozen? Usually it is 5-15 seconds. This means that there is no point in displaying the progress bar before this time has elapsed. The second purpose of the progress bar is to show useful information for the user. I would like to have an API that allows to do such things OOB and save (module) developers (see for ex., ADUC or EMS (Exchange Server)) from duplication. |
Copy-ItemCopy-Item
|
Let me try a different approach as a separate PR to see if the perf isn't significantly impacted |
|
See if #18735 is preferred although there is a bigger perf penalty |
|
Closing this in favor of the other one |
PR Summary
Copy-Itemfor FileSystemProvider already has progress for copying to/from PSSession, but nothing for local copies. So for a large copy, the cmdlet just sits until it completes (although-Verbosecould be used, but it's noisy and not the right way to get progress). Change here is to have two progress bars, one when copying a file and another when copying a directory. For directories, we can get the number of files within the directory and show percent complete. However, we cannot get the total files/folders when used recursively (without incurring a huge up front cost to enumerate it all) so the progress doesn't show the total operation percent complete, but does indicate what is happening.PR Context
Fix #18637
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).