Improve a progress pane performance by iSazonov · Pull Request #2640 · PowerShell/PowerShell · GitHub
Skip to content

Improve a progress pane performance#2640

Merged
lzybkr merged 2 commits intoPowerShell:masterfrom
iSazonov:writeprogresstimer
Nov 8, 2016
Merged

Improve a progress pane performance#2640
lzybkr merged 2 commits intoPowerShell:masterfrom
iSazonov:writeprogresstimer

Conversation

@iSazonov
Copy link
Copy Markdown
Collaborator

@iSazonov iSazonov commented Nov 7, 2016

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

Add timer to update a progress pane every 200 ms
@msftclas
Copy link
Copy Markdown

msftclas commented Nov 7, 2016

@SteveL-MSFT
Copy link
Copy Markdown
Member

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

@iSazonov
Copy link
Copy Markdown
Collaborator Author

iSazonov commented Nov 8, 2016

@lzybkr lzybkr merged commit 760a9c2 into PowerShell:master Nov 8, 2016
@iSazonov iSazonov deleted the writeprogresstimer branch November 10, 2016 05:28
daxian-dbw added a commit to daxian-dbw/PowerShell that referenced this pull request Nov 29, 2016
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants