Skip to content

Bug: Slow file selection when Recycle Bin has many files #18420

@muko

Description

@muko

Description

Selecting files can cause noticeable delays, especially when the Recycle Bin contains a large number of items.

SHQueryRecycleBin() can be slow (over 1 second) when the Recycle Bin is large, and ToolBar.PopulateToolbarItems() is called multiple times per selection leads to UI lag.

ToolBar.PopulateToolbarItems()
   -> ...
        -> TrashBinService.QueryRecycleBin()
            -> PInvoke.SHQueryRecycleBin()

Steps To Reproduce

  1. Fill the Recycle Bin with a large number of files
  2. Execute Files
  3. Navigate to a folder
  4. Change file selection repeatedly

Files Version

4.0.40.0

Windows Version

10.0.26100

User ID

No response

Log File

no log files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions