title: async await makes my tasks slow while task.Start() runs them fast
body: <p>I am running 10k tasks which each send a batch of data to an Azure Storage Table.</p>
  
  <p>If I use the first method below with async await that returns running tasks the tasks execute really slow and increasingly slower from a couple of seconds climbing up to 10, 100 seconds etc.</p>
  
  <p>If I use the second method below that returns new running tasks they run really quickly! Just a very few tens of ms per task.</p>
  
  <p>Why is there such a huge difference here? What am I missing?</p>
  
  <p>At the end of my task creation I do a simple Task.WaitAll(allTasks.ToArray()).</p>
  
  <pre><code>    private static async Task ExecuteBatch(TableBatchOperation tableBatchOperation, CloudTable cloudTable, TextWriter log)
  {
      var stopwatch = Stopwatch.StartNew();
      await cloudTable.ExecuteBatchAsync(tableBatchOperation);
      stopwatch.Stop();
      log.WriteLine("Committed " + tableBatchOperation.Count + " records in " + stopwatch.Elapsed.TotalSeconds + " seconds.");
  }
  
  private static Task ExecuteBatch2(TableBatchOperation tableBatchOperation, CloudTable cloudTable, TextWriter log)
  {
      return Task.Run(() =&gt;
      {
          var stopwatch = Stopwatch.StartNew();
          cloudTable.ExecuteBatch(tableBatchOperation);
          stopwatch.Stop();
          log.WriteLine("Committed " + tableBatchOperation.Count + " records " + " in " + stopwatch.Elapsed.TotalSeconds + " seconds.");
      });
  }
  </code></pre>
  
  <p>aftger</p>