-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Quadratic behavior during tab completion #13432
Copy link
Copy link
Open
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.
Metadata
Metadata
Assignees
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.
Steps to reproduce
Open procmon and filter only syscall made by pwsh.exe,
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:

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:

Environment data