GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — Improve a progress pane performance by iSazonov · Pull Request #2640 · PowerShell/PowerShell Conversation
|
|
Hi Ilya (@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; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov) do you have any perf data particularly with invoke-webrequest? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Steve Lee (@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.5506 After 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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…es race conditions
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
… 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
* Improve a progress pane performance Add timer to update a progress pane every 100 ms
…es race conditions
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.