GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve a progress pane performance by iSazonov · Pull Request #2640 · PowerShell/PowerShell

Conversation

@iSazonov

@iSazonov Ilya (iSazonov) commented Nov 7, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iSazonov
Improve a progress pane performance
d951d9d
Add timer to update a progress pane every 200 ms
@msftclas

Microsoft Contribution License Agreements (msftclas) commented Nov 7, 2016

Copy link
Copy Markdown

Hi Ilya (@iSazonov), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@msftclas Microsoft Contribution License Agreements (msftclas) added the cla-already-signed label Nov 7, 2016
@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Nov 7, 2016

Copy link
Copy Markdown
Member

Ilya (@iSazonov) do you have any perf data particularly with invoke-webrequest?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented Nov 8, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator Author

Steve Lee (@SteveL-MSFT)
Before patch:

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
SteveL-MSFT reacted with thumbs up emoji jasongin reacted with hooray emoji
All reactions
  • 👍 1 reaction
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lzybkr
Update every 100ms instead of 200ms
09de2db
@lzybkr
Jason Shirk (lzybkr) merged commit 760a9c2 into PowerShell:master Nov 8, 2016
@iSazonov
Ilya (iSazonov) deleted the writeprogresstimer branch November 10, 2016 05:28
This was referenced Nov 16, 2016
Write-Progress bar does not go away after operation is finished #1625
Closed
Search progress bar not clearing after the task is done. #2654
Closed
@SteveL-MSFT Steve Lee (SteveL-MSFT) mentioned this pull request Nov 21, 2016
Unhandled Exception running tests under opencover #2756
Closed
@daxian-dbw Dongbo Wang (daxian-dbw) mentioned this pull request Nov 29, 2016
Updating progress pane using timer causes race condition that would randomly crash powershell #2800
Closed
Dongbo Wang (daxian-dbw) added a commit to daxian-dbw/PowerShell that referenced this pull request Nov 29, 2016
@daxian-dbw
Revert the timer change introduced in PowerShell#2640 because it caus…
ea464fc
…es race conditions
Mike Richmond (mirichmo) pushed a commit that referenced this pull request Nov 30, 2016
@daxian-dbw @mirichmo
Revert the timer change introduced in #2640 because it causes race co…
62af9b7
…nditions
@iSazonov Ilya (iSazonov) mentioned this pull request Dec 1, 2016
Improve a progress pane performance (one thread) #2822
Merged
Ilya (iSazonov) added a commit to iSazonov/PowerShell that referenced this pull request Dec 19, 2016
@iSazonov
Improve a progress pane performance (one thread)
1136635
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
@Sekers
Disable Progress Bar In Function Scope When Calling Invoke-WebRequest…
9d80eca
… 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
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@iSazonov @lzybkr
Improve a progress pane performance (PowerShell#2640)
d79f8d1
* Improve a progress pane performance

Add timer to update a progress pane every 100 ms
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@daxian-dbw @mirichmo
Revert the timer change introduced in PowerShell#2640 because it caus…
5b6cbdd
…es race conditions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@iSazonov @msftclas @SteveL-MSFT @lzybkr
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.