title: Azure file Storage SMB slow to list files in directory
body: <p>We have an app that lists files in a folder through Azure Files.  When we use the C# method: </p>
  
  <pre><code>Directory.GetFiles(@"\\account.file.core.windows.net\xyz")
  </code></pre>
  
  <p>It takes around a minute when there are 2000 files.</p>
  
  <p>If we use CloudStorageAccount to do the same:</p>
  
  <pre><code>  CloudFileClient fileClient = storageAccount.CreateCloudFileClient();
    CloudFileDirectory directory = fileClient.GetShareReference("account").GetRootDirectoryReference().GetDirectoryReference("abc");
    Int64 totalLength = 0;
    foreach (IListFileItem fileAndDirectory in directory.ListFilesAndDirectories())
    {
      CloudFile file = (CloudFile)fileAndDirectory;
      if (file == null) //must be directory if null
        continue;
  
      totalLength += file.Properties.Length;
    }
  </code></pre>
  
  <p>It returns all the files, but takes around 10 seconds.  Why is there such a large difference in performance?</p>