title: NSURLSessionDataTask acting suspiciously slow
body: <p>I'm getting JSON data from the web, parse it, then using it to diplay pins on a map. </p>
  
  <p>Here is method one, which there is no problem with:</p>
  
  <pre><code>NSString *CLIENT_ID = @"SECRET_ID";
      NSString *CLIENT_SECRET = @"CLIENT_SECRET";
  
      NSString *SEARCH = [NSString stringWithFormat:@"https://api.foursquare.com/v2/venues/search?near=gjovik&amp;query=cafe&amp;client_id=%@&amp;client_secret=%@&amp;v=20140119", CLIENT_ID, CLIENT_SECRET];
  
      NSURL *searchResults = [NSURL URLWithString:SEARCH];
      NSData *jsonData = [NSData dataWithContentsOfURL:searchResults];
  
      NSError *error = nil;
      NSDictionary *dataDictionary = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&amp;error];
  
      self.venues = dataDictionary[@"response"][@"venues"];
  
      [self loadAnnotationsAndCenter:YES];
  </code></pre>
  
  <p><code>[self loadAnnotationsAndCenter:YES];</code> retrieves the lat and lng from the JSON file and uses it to display pins on the map.</p>
  
  <p>I decided to change my code uing NSURLSession. Here's what it looks like:</p>
  
  <pre><code>NSString *CLIENT_ID = @"SECRET_ID";
  NSString *CLIENT_SECRET = @"CLIENT_SECRET";
  
  NSString *SEARCH = [NSString stringWithFormat:@"https://api.foursquare.com/v2/venues/search?near=gjovik&amp;query=cafe&amp;client_id=%@&amp;client_secret=%@&amp;v=20140119", CLIENT_ID, CLIENT_SECRET];
  
  NSURL *URL = [NSURL URLWithString:SEARCH];
  NSURLRequest *request = [NSURLRequest requestWithURL:URL];
      NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
      NSURLSession *session = [NSURLSession sessionWithConfiguration:config];
  
      NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
          NSDictionary *dataDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
          self.venues = dataDictionary[@"response"][@"venues"];
          [self loadAnnotationsAndCenter:YES];
      }];
  
      [task resume]
  </code></pre>
  
  <p>NSURLSession is between 10 and 30 seconds slower than the first method. I don't understand why that is. The search string, in this case, returns 27 different locations, if that matters</p>
  
  <p>Cheers.</p>