Last active
January 20, 2018 13:42
-
-
Save mazzy-ax/cdbd08f3997894bec32914e23446f020 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Path = 'C:\AOSService\PackagesLocalDirectory\' | |
$Path = 'C:\AOSService\PackagesLocalDirectory\ApplicationSuite' | |
#$Path = 'C:\AOSService\PackagesLocalDirectory\ApplicationSuite\Foundation\AxForm' | |
#$Path = 'C:\AOSService\PackagesLocalDirectory\Currency\' | |
$filter = '*.xml' | |
# 117592 files - 21 sec | |
measure-command { | |
$d = | |
Get-ChildItem -Path $Path -Filter '*.xml' -File -Force -Recurse | |
} | |
# 117592 files - 38 sec, 4 threads | |
measure-command { | |
$d = | |
(Resolve-Path $Path).Path | | |
Split-Pipeline -Refill {process{ | |
Get-ChildItem -LiteralPath $_ -Directory -Force | ForEach-Object { [ref]$_.FullName } | |
Get-ChildItem -LiteralPath $_ -Filter '*.xml' -File -Force | ForEach-Object { $_.FullName } | |
}} | |
} | |
$d.count | |
$d | Select-Object -First 3 | ft |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment