Open YuanMSFT opened 8 years ago
Using the Measure-Command cmdlet, I am seeing similar results.
Folder A:
Folder B:
Folder C:
I'm not sure if this is a bug, as there are probably setup/teardown things that are only occurring once when scanning folder C recursively, whereas the setup / teardown is counted twice when summing A's and B's time. But I can confirm the findings.
Seems to me this indicates out of 53, 38, and 37 second per attempt, 22 were spent somewhere else, but scanning directories. Something like initialization and cleanup. Is there any way to profile time spent at more granular level?
In an example of folder "A" contains sub folder "B" and "C".
Scanning folder "A" recursively took 53 seconds.
Scanning folder "B" recursively took 38 seconds. Scanning folder "C" recursively took 37 seconds.
The sum to scan sub folder is 22 seconds more than scanning the parent folder. 38+37-53=22.