-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Performance problem: -Name slows down Get-ChildItem -Recurse #9119
Copy link
Copy link
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management moduleWG-Engine-Performancecore PowerShell engine, interpreter, and runtime performancecore PowerShell engine, interpreter, and runtime performance
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management moduleWG-Engine-Performancecore PowerShell engine, interpreter, and runtime performancecore PowerShell engine, interpreter, and runtime performance
Type
Fields
Give feedbackNo fields configured for issues without a type.
-Nameis a convenient switch to only output item names (without-Recurse) or relative paths (with-Recurse).Given that only string instances rather than
System.IO.File/DirectoryInfoinstances are output, one would expect-Nameto speed things up (or at least not to slow things down); however, with-Recursepresent,-Nameslows down the command noticeably.Steps to reproduce (on Windows)
Expected behavior
The command with
-Nameshould be faster (or at least not slower).Actual behavior
Sample timings:
That is, adding
-Namemade the command about 3 times slower.Environment data