You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Winget List command takes 10 seconds to complete. #855
@ecovio1 thanks for reporting this. It may be related to what we have to do to get the list of Apps from "Add/Remove Programs" and match them with the list of matching packages in the sources you have configured. Some work was done to speed this up, but there may still be more we can do.
After that, it weirdly lists (what looks like) every program on my system, not just those installed with winget. I don't know if that's the desired result nor do I particularly mind it, especially if I can use it to uninstall everything on my system, but it would definitely be nice if it is somehow cached that result.
The output that the author posted, in case it is of any use:
~\git> winget features
The following experimental features are in progress.
They can be configured through the settings file 'winget settings'.
Feature Status Property Link
-----------------------------------------------------------------------------------
Microsoft Store Support Disabled experimentalMSStore https://aka.ms/winget-settings
Packaged API Support Enabled packagedAPI https://aka.ms/winget-settings
~\git> winget --version
v1.0.11694
~\git> winget --info
Windows Package Manager v1.0.11694
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22000.168
Package: Microsoft.DesktopAppInstaller v1.15.11694.0
Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
Links
--------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
Licence Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Also for completeness sake: I'm using windows 11
Reacted by Demitrius Nelon, Kevin Huang, minzdrav, Julian Pawlowski and Kenichi Kamiya
Elias (@Elias-Graf) , list is intended to show everything on the system (and uninstall is intended to allow you to interact with everything as well).
That is impressively long; I was thinking we should have caching when I was measuring ~600ms to resolve the localized names of the MSIX packages on the system. If you could provide a log file from the long running list command, I could start to look into exactly what is taking so long.
If you run winget list --verbose-logs then get the latest file from %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir it should hopefully point to where the time is being spent.
I have a lot of stuff installed and this install has been through all of 10 up to now, so it may just be something causing a issue but 791ms for a list seems egregious
JohnMcPMS Well, some time elapsed and of course my system changed. E.g. restarted the computer, installed further windows 11 beta updates. And it looks like that resulted in the winget list command consistently taking roughly 1.5s. That is way more pleasant, if not acceptable. Although it has to be said that at the time of writing this comment I'm facing #1437.
If it gets worse I will get back to you, and if you still want the debug output please get back to me 😊.
This should be fixed by our more recent pre-release packages, assuming that the vast majority of extreme times was due to the msstore source. In particular, v1.0.12576 is the first to have the fix.
Generally we do need to improve the behavior in this area long term, likely via a caching mechanism of some kind. Alternately (really, in addition to) we could remove the upgrade availability indicators from list to improve performance. Now that we have upgrade it might make sense to do so, but probably not before the caching is in place due to the implementation details.
10 seconds? Lucky! I'm up to 300 seconds on my machine with 400Mbs internet. Pretty sure it's throttling requests on the back end source calls, which is silly since it's a command you run locally to get a list of installed apps on your system, and the backend call are purely incidental. I should be able to run winget list and winget upgrade --all as often as I want locally without throttling on the backend. If the CDN isn't throttling, then there is something seriously wrong with the performance of the backend services.
Activity
denelon commentedon Apr 7, 2021
@ecovio1 thanks for reporting this. It may be related to what we have to do to get the list of Apps from "Add/Remove Programs" and match them with the list of matching packages in the sources you have configured. Some work was done to speed this up, but there may still be more we can do.
Elias-Graf commentedon Aug 31, 2021
winget listactually takes even longer than 10s for me, roughly 24.After that, it weirdly lists (what looks like) every program on my system, not just those installed with winget. I don't know if that's the desired result nor do I particularly mind it, especially if I can use it to uninstall everything on my system, but it would definitely be nice if it is somehow cached that result.
The output that the author posted, in case it is of any use:
Also for completeness sake: I'm using windows 11
JohnMcPMS commentedon Sep 8, 2021
Elias (@Elias-Graf) ,
listis intended to show everything on the system (anduninstallis intended to allow you to interact with everything as well).That is impressively long; I was thinking we should have caching when I was measuring ~600ms to resolve the localized names of the MSIX packages on the system. If you could provide a log file from the long running list command, I could start to look into exactly what is taking so long.
If you run
winget list --verbose-logsthen get the latest file from%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDirit should hopefully point to where the time is being spent.If you prefer, you can run
winget list --verbose-logsthen use Feedback Hub via http://aka.ms/winget-feedback and report the feedback id here.Masamune3210 commentedon Sep 9, 2021
I have a lot of stuff installed and this install has been through all of 10 up to now, so it may just be something causing a issue but 791ms for a list seems egregious

Masamune3210 commentedon Sep 9, 2021
Apparently newstore was causing a lot of the issue, after disabling and removing it it drops down to 394 for me

Elias-Graf commentedon Sep 9, 2021
JohnMcPMS Well, some time elapsed and of course my system changed. E.g. restarted the computer, installed further windows 11 beta updates. And it looks like that resulted in the
winget listcommand consistently taking roughly 1.5s. That is way more pleasant, if not acceptable. Although it has to be said that at the time of writing this comment I'm facing #1437.If it gets worse I will get back to you, and if you still want the debug output please get back to me 😊.
pcbeard commentedon Sep 9, 2021
Using
winget source remove newstoreis a good workaround for #1437, and it seems to have sped upwinget list.JohnMcPMS commentedon Sep 23, 2021
This should be fixed by our more recent pre-release packages, assuming that the vast majority of extreme times was due to the
msstoresource. In particular, v1.0.12576 is the first to have the fix.Generally we do need to improve the behavior in this area long term, likely via a caching mechanism of some kind. Alternately (really, in addition to) we could remove the upgrade availability indicators from
listto improve performance. Now that we haveupgradeit might make sense to do so, but probably not before the caching is in place due to the implementation details.45 remaining items
Karl-WE commentedon Jan 7, 2023
If winget relies on cim / wmi it is quite naturally slow based on CPU type and number of apps.
If you run a query via PowerShell it should be the same.
denelon commentedon Jul 11, 2023
The issue related to correlation attempts to the "msstore" REST source has been addressed.
arcyc commentedon Sep 25, 2023
10 seconds? Lucky! I'm up to 300 seconds on my machine with 400Mbs internet. Pretty sure it's throttling requests on the back end source calls, which is silly since it's a command you run locally to get a list of installed apps on your system, and the backend call are purely incidental. I should be able to run winget list and winget upgrade --all as often as I want locally without throttling on the backend. If the CDN isn't throttling, then there is something seriously wrong with the performance of the backend services.