title: DocumentDB performance issues
body: <p>When running from DocumentDB queries from C# code on my local computer a simple DocumentDB query takes about 0.5 seconds in average. Another example, getting a reference to a document collection takes about 0.7 seconds in average. Is this to be expected? Below is my code for checking if a collection exists, it is pretty straight forward - but is there any way of improving the bad performance? </p>
  
  <pre><code>// Create a new instance of the DocumentClient
  var client = new DocumentClient(new Uri(EndpointUrl), AuthorizationKey);
  
  // Get the database with the id=FamilyRegistry
  var database = client.CreateDatabaseQuery().Where(db =&gt; db.Id == "FamilyRegistry").AsEnumerable().FirstOrDefault();
  
  var stopWatch = new Stopwatch();
  stopWatch.Start();
  
  // Get the document collection with the id=FamilyCollection
  var documentCollection = client.CreateDocumentCollectionQuery("dbs/" 
      + database.Id).Where(c =&gt; c.Id == "FamilyCollection").AsEnumerable().FirstOrDefault();
  
  stopWatch.Stop();
  
  // Get the elapsed time as a TimeSpan value.
  var ts = stopWatch.Elapsed;
  
  // Format and display the TimeSpan value.
  var elapsedTime = String.Format("{0:00} seconds, {1:00} milliseconds",
      ts.Seconds,
      ts.Milliseconds );
  
  Console.WriteLine("Time taken to get a document collection: " + elapsedTime);
  Console.ReadKey();
  </code></pre>
  
  <p>Average output on local computer:</p>
  
  <pre><code>Time taken to get a document collection: 0 seconds, 752 milliseconds
  </code></pre>
  
  <p>In another piece of my code I'm doing 20 small document updates that are about 400 bytes each in JSON size and it still takes 12 seconds in total. I'm only running from my development environment but I was expecting better performance.</p>