Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Quadratic behavior during tab completion #13432

Copy link
Copy link
@xavierd

Description

@xavierd
Issue body actions

Steps to reproduce

Open procmon and filter only syscall made by pwsh.exe,

cd C:/a/directory/with/lots/of/files
cd <tab>

Notice how pwsh.exe attempts to list all the files in C:/, then C:/a, then C:/directory, etc, for every directory present in C:/a/directory/with/lots/of/files. Assuming this is a pretty large directory, tab completion could take a very long time.

Screenshot of procmon:
pwsh

I have a feeling #12795 might be related to this issue.

Expected behavior

pwsh.exe should only be listing files/directory once in CWD to do the tab completion. This doesn't reproduce with PowerShell 5.1.

Screenshot of procmon:
powershell

Environment data

% $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Microsoft Windows 10.0.19041
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeWG-Engine-Performancecore PowerShell engine, interpreter, and runtime performancecore PowerShell engine, interpreter, and runtime performanceWG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.built-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.