Skip to content

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

Open

Description

@RobertK66

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

  • open normal cmd window with 'run as admin'.
  • type "winget list --name A"

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

Activity

  1. github-actions commented on Aug 4, 2024

    @github-actions

    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.

  2. RobertK66 commented on Aug 4, 2024

    @RobertK66
    Author

    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...

  3. added
    Issue-Bug
    Area-Performance
    and removed
    Needs-Triage
    on Aug 5, 2024
  4. mamoreau-devolutions commented on May 8, 2026

    @mamoreau-devolutions
    Contributor

    I wonder if this isn't the same problem I fixed in #6171 and #6172

  5. RobertK66 commented on May 9, 2026

    @RobertK66
    Author

    I revisited this now with my current version of winget( v1.28.240 ). The search --name A still needs about a minute (repeatable) at my machine. The list without name filter is completed after 2.5 seconds! Your reference to ACLs seems plausible here because my initial tests (with the 26 minutes execution for one time!) happened on a developer machine with 'heavy history' of installs/upgrades and user profiles.....

    What i still do not get here is: Why does a name filter run into changing/manipulating ACLs when the normal list command is perfectly happy with listing all the names to be searched ;-).

  6. mamoreau-devolutions commented on May 9, 2026

    @mamoreau-devolutions
    Contributor

    You need to try this build to see if the performance improvements make a difference in your specific scenario, 1.28 still has the problems I fixed: https://github.com/microsoft/winget-cli/releases/tag/v1.29.170-preview

  7. RobertK66 commented on May 11, 2026

    @RobertK66
    Author

    Tried v1.29.170-preview. Could not find any differences to previous v1.28.240. List is ca. 2 sec. where filter with single letter takes more than a minute:

    PS C:\Users\Robert> winget --version
    v1.29.170-preview
    PS C:\Users\Robert> Measure-Command { winget list }
    
    ...
    TotalSeconds      : 2,0188435
    TotalMilliseconds : 2018,8435
    
    
    PS C:\Users\Robert> Measure-Command { winget list --name A }
    
    ...
    TotalSeconds      : 63,4487311
    TotalMilliseconds : 63448,7311
    
    
  8. changed the title [-]"winget list --name xy" executes VERY SLOW when using broad filter (for the first time?)[/-] [+]"winget list --name xy" executes (VERY) SLOW when using broad filter (for the first time?)[/+] on May 11, 2026
  9. mamoreau-devolutions commented on May 12, 2026

    @mamoreau-devolutions
    Contributor

    Thanks for confirming. Next time I spend time building winget-cli from source I'll see if I can find the reason for this poor performance, it's intriguing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-PerformanceIssue-Bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions