title: How to increase the performance while downloding the blob to local storage
body: <p>I have below code to download the JSON file which is in blob storage. Actually this below code takes more than a minute to download it in local folder, please suggest me to increase performance by refining this below code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>CloudStorageAccount storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
  CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
  CloudBlobContainer container = blobClient.GetContainerReference("containername");
  CloudBlockBlob blockBlob2 = container.GetBlockBlobReference(“jsonfile_name"); 
  string jsonString = string.Empty;
  
  using (var memoryStream = new MemoryStream())
  {
  blockBlob2.DownloadToStream(memoryStream);
  jsonString = System.Text.Encoding.UTF8.GetString(memoryStream.ToArray());
  using (FileStream fs = new FileStream(localfolderPath, FileMode.Create))
  {
  using (StreamWriter writer = new StreamWriter(fs))
  {
  writer.Write(jsonString);
  }
  }
  }</code></pre>
  </div>
  </div>
  </p>