Skip to content
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

Winget Outdated...install takes FOREVER. #2022

Closed
gonzolively opened this issue May 31, 2024 · 1 comment · Fixed by #2083
Closed

Winget Outdated...install takes FOREVER. #2022

gonzolively opened this issue May 31, 2024 · 1 comment · Fixed by #2083

Comments

@gonzolively
Copy link

gonzolively commented May 31, 2024

Describe the bug
Upon the first "install" item, the script detects that winget is out of date and tries to install an updated version. The problem is that the downloading of the new Winget util takes on average of an hour or more. Initially I thought this was a winget issue (can't download winget with winget though, am I right?) so I tweaked the winget settings.json file to use a different downloader, but that didn't fix the issue.

The problem is not bandwidth as I have a 200mb down/200mb up connection, and the util is only 155mb (per the Microsoft App Store).

To Reproduce
Steps to reproduce the behavior:

  1. Run winutil
  2. Click on 'Install'
  3. Select item to install
  4. Script detects that winget is out of date and tries to install the latest winget util.

Expected behavior
I honestly expect this to take a minute or two at best.

**Additional context:
I assume this is an issue with limitations aroundInvoke-WebRequest found in the Get-WinUtilWingetLatest function (located in winutil.ps1), but unfortunately don't have any suggestions on how to speed this up besides possibly incorporating the -OutFile parameter to download the files directly to the desired location without storing them in memory first.

@Marterich
Copy link
Contributor

Your right. The Invoke-WebRequest is reducing the speed here quite a bit.
I created a PR that got merged to the test branch a few weeks ago that should optimize this but the last Test->Main merge is already quite old so that the changes are not yet reflected on the main branch #1931

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 a pull request may close this issue.

2 participants