title: Downloading contents of a Azure blob as a text string taking too long time
body: <p>I am developing an application that</p>
  
  <ol>
  <li><p>Upload a .CSV file on Azure blob storage from my local machine using simple HTTP web page (REST methods)</p></li>
  <li><p>Once, the .CSV file is uploaded, I fetch the stream in order to update my database</p></li>
  </ol>
  
  <p>The .CSV file is around 30 MB,  it takes 2 minutes to upload to blob, <strong>but takes 30 minutes to read the stream</strong>. <strong>can you please provide inputs to improve the speed?</strong>
  Here is the code snippet being used to read stream from the file:
  <a href="https://azure.microsoft.com/en-in/documentation/articles/storage-dotnet-how-to-use-blobs/" rel="noreferrer">https://azure.microsoft.com/en-in/documentation/articles/storage-dotnet-how-to-use-blobs/</a></p>
  
  <pre><code>public string GetReadData(string filename)
          {
              // Retrieve storage account from connection string.
              CloudStorageAccount storageAccount = CloudStorageAccount.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["StorageConnectionString"]);
  
              // Create the blob client.
              CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
  
              // Retrieve reference to a previously created container.
              CloudBlobContainer container = blobClient.GetContainerReference(System.Web.Configuration.WebConfigurationManager.AppSettings["BlobStorageContainerName"]);
  
              // Retrieve reference to a blob named "filename"
              CloudBlockBlob blockBlob2 = container.GetBlockBlobReference(filename);
  
              string text;
              using (var memoryStream = new MemoryStream())
              {
                  blockBlob2.DownloadToStream(memoryStream);
                  text = System.Text.Encoding.UTF8.GetString(memoryStream.ToArray());
              }
  
              return text;
          }
  </code></pre>