-
Notifications
You must be signed in to change notification settings - Fork 191
PowerShellForGitHub: Suggest Disabling ProgressBar when Calling Invoke-WebRequest #227
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
Comments
Interesting. Very interesting. Thanks for the background. I agree that based on that thread, we should consider a change. That thread also points out that the issue was fixed in PS 7 (which your repro also confirms), so I don't want all users to lose out on potentially helpful status information, simply because of an issue in the earlier platform. So...my thought is to add a new configuration property: The one thing to keep in mind when implementing a config property read within Approving the suggestion, and marking it as |
Are you sure that is not over-engineering the solution? If you have |
You raise great points. Agreed. Forget the new config property, and proceed as you initially described. Thanks! |
Disables the PowerShell progress bar for the `Invoke-WebRequest` cmdlet calls in the `Invoke-GHRestMethod` and `Invoke-SendTelemetryEvent` functions due to known performance issues in PowerShell 5.1. Reference: [Progress bar can significantly impact cmdlet performance.](PowerShell/PowerShell#2138) Fixes #227
Issue Details
It is a known issue that the speed of
Invoke-WebRequest
is affected badly by displaying the progress bar, especially for larger transfers in PowerShell 5. See Progress bar can significantly impact cmdlet performance.It is suggested to disable the progress bar for
Invoke-WebRequest
to improve the speed of the Pester tests and also general module performance. This would also remove progress bar 'flickering' when usingNoStatus
.Steps to reproduce the issue
Results
Suggested solution to the issue
Add the following lines before both
Invoke-WebRequest
calls in theInvoke-GHRestMethod
function:and the following line after both calls:
This change has no affect on the Status progress bar.
Requested Assignment
Operating System
PowerShell Version
Module Version
Running: 0.14.0
Installed: 0.14.0
The text was updated successfully, but these errors were encountered: