microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.25k stars 1.45k forks source link

"winget list --name xy" executes VERY SLOW when using broad filter (for the first time?) #4701

Open RobertK66 opened 3 months ago

RobertK66 commented 3 months ago

Brief description of your issue

when I execute "winget list" I do get a result with 376 entries. This command takes apr. 2.5 sec to execute and show.

when I execute "winget list --name My" I do get 4 lines and it takes apr. 4.5 sec.

when I execute "winget list --name Mi" I do get 134 lines (all containing Microsoft ;-) ). This took about 2:40 minutes to show the first time I called it. After the successful call the same command takes now apr. 10 sec. (Also if executed in new Command window)

when executing "winget list --name A" I never was able to get any result until now....

Note: the spinning '|' indicator in all cases stops after some seconds and a 'normal blinking console cursor' is shown for the rest of the time.

Steps to reproduce

Expected behavior

there should a result be presented after some decent time.

Actual behavior

the example from "steps to reproduce" never gave any results after keeping the command window open for more than 15 minutes....

Environment

Windows-Paket-Manager v1.8.1911
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.22631.3880
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.23.1911.0
github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

RobertK66 commented 3 months ago

Ok after authoring and reviewing this issue (and the hinted #2104, #855, #1259) the cmd "winget list --name A" now finished after 26 minutes 😄 with plausible 271 entries ....

Now a repeat of this executes in acceptable 6 seconds in the same session and about 40 seconds in a new command window....

I am not sure why this strange behavior exists but it seems that the name search does have some other source of basic data than the list without filter. At least a timeout with some hints about what could be wrong with the 'installed data' would help in the first case here...