-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Improve a progress pane performance #2640
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add timer to update a progress pane every 200 ms
|
Hi @iSazonov, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! The agreement was validated by Microsoft and real humans are currently evaluating your PR. TTYL, MSBOT; |
Member
|
@iSazonov do you have any perf data particularly with invoke-webrequest? |
Collaborator
Author
|
@SteveL-MSFT Measure-Command { Invoke-WebRequest "https://github.com/dotnet/corefx/archive/master.zip" -OutFi
le "C:\tmp\master.zip" }
Days : 0
Hours : 0
Minutes : 0
Seconds : 49
Milliseconds : 741
Ticks : 497419183
TotalDays : 0.000575716646990741
TotalHours : 0.0138171995277778
TotalMinutes : 0.829031971666667
TotalSeconds : 49.7419183
TotalMilliseconds : 49741.9183
Measure-Command { $wc = New-Object System.Net.WebClient; $wc.DownloadFile("https://github.com/do
tnet/corefx/archive/master.zip", "C:\tmp\master.zip") }
Days : 0
Hours : 0
Minutes : 0
Seconds : 20
Milliseconds : 154
Ticks : 201545506
TotalDays : 0.000233270261574074
TotalHours : 0.00559848627777778
TotalMinutes : 0.335909176666667
TotalSeconds : 20.1545506
TotalMilliseconds : 20154.5506After patch: Measure-
Command { Invoke-WebRequest "https://github.com/dotnet/corefx/archive/master.zip" -OutFile "C:\tmp\master.zip" }
Days : 0
Hours : 0
Minutes : 0
Seconds : 19
Milliseconds : 320
Ticks : 193203890
TotalDays : 0.000223615613425926
TotalHours : 0.00536677472222222
TotalMinutes : 0.322006483333333
TotalSeconds : 19.320389
TotalMilliseconds : 19320.389 |
This was referenced Nov 16, 2016
daxian-dbw
added a commit
to daxian-dbw/PowerShell
that referenced
this pull request
Nov 29, 2016
…es race conditions
mirichmo
pushed a commit
that referenced
this pull request
Nov 30, 2016
iSazonov
added a commit
to iSazonov/PowerShell
that referenced
this pull request
Dec 19, 2016
1. All updates left in one thread. (The use of multiple threads was the main problem previous PR PowerShell#2640) 2. The timer is only used to set up a update flag. (According to my tests calling Datetime.Now() and verifing the time delta creates a much larger delay) 3. The timer interval is 200 ms. I test intervals from 50 ms to 2000 ms. I don't see any differences on the screen with 100 ms and 200 ms. So I chose the more cost-effective option. What do you think about this? 4. Removed unnecessary locking. `WriteProgress` is executed as quickly as possible, as a result the entire script executes significantly faster
Sekers
added a commit
to Sekers/SKYAPI
that referenced
this pull request
Nov 6, 2024
… or Invoke-RestMethod. This improves performance due to a bug in some versions of PowerShell. It was eventually fixed in Core (v6.0.0-alpha.13) but still is around in Desktop. More Information: PowerShell/PowerShell#2640
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add timer to update a progress pane every 200 ms.
(After we get the timer it will be possible to solve the "hung" state problem in following PR)
Close #2138