title: UNC Path Appears To Slow File Enumeration Considerably
body: <p>I have written a sample application to debug an issue with enumerating files.</p>
  
  <p>Enumerating a directory with a local path (eg C:\Data\MAN) enumerates considerably quicker than a shared directory with a UNC path (eg \\MACHINENAME\man). Even though these paths both point to the same directory on the local machine.</p>
  
  <p><strong>With 72000 files, this takes approx 10 seconds:</strong></p>
  
  <pre><code>DirectoryInfo directoryInfo = new DirectoryInfo(@"C:\Data\MAN");
  FileInfo[] fileInfoTest = directoryInfo.GetFiles("*.*", 
                                                   SearchOption.AllDirectories);
  </code></pre>
  
  <p><strong>With 72000 files, this takes approx 2 minutes:</strong> (where \\MACHINENAME\man is shared folder C:\Data\MAN)</p>
  
  <pre><code>DirectoryInfo directoryInfo = new DirectoryInfo(@"\\MACHINENAME\man");
  FileInfo[] fileInfoTest = directoryInfo.GetFiles("*.*", 
                                                   SearchOption.AllDirectories);
  </code></pre>
  
  <p><strong>Is this amount of overhead expected when using a UNC path?</strong></p>