title: iOS background queue retrieving data twice?
body: <p>I'm trying to increase the responsiveness of my app and while checking out the debugger console I've noticed that the app seems to be retrieving XML data twice . . . that is, when the page appears, I dispatch a background queue to go fetch some xml data, parse it, and return an array of objects. I type out the data string in the console using nslog, and for some reason It's printing it out twice. Heres my relevant code:</p>
  
  <p>In the VC:</p>
  
  <pre><code>-(void)startBackgroundQueue{
  dispatch_async(backgroundThread, ^(void){
      SDJConnection *connection = [[SDJConnection alloc]init];
      self.dataArray = [connection getVideoData];
  
      [[NSNotificationCenter defaultCenter]postNotificationName:@"tube_data_loaded" object:nil];
      });
  }
  </code></pre>
  
  <p>the getVideoData method in SDJConnection looks like this:</p>
  
  <pre><code>-(NSMutableArray *)getVideoData {
  
  NSURL *dataURL = [[NSURL alloc]initWithString:@"https://gdata.youtube.com/feeds/api/users/dancingastronaut/uploads?start-index=1&amp;max-results=10"];
  NSData *data = [[NSData alloc]initWithContentsOfURL:dataURL];
  
  NSString *dataString = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
  NSLog(@"data string: %@",dataString);
  
  YouTubeParser *parser = [[YouTubeParser alloc]initWithData:data];
  [parser setDelegate:parser];
  
  [parser parse];
  
      return [parser videosArray];
  
  }
  </code></pre>
  
  <p>and then the VC performs this code:</p>
  
  <pre><code>-(void)backgroundQueueDone{
  dispatch_async(dispatch_get_main_queue(),^(void){
      [activityIndicator stopAnimating];
      if ([_dataArray count] &gt;1) {
          self.tableView.separatorColor = [UIColor darkGrayColor];
          [self.tableView reloadData];}                
  });
  }
  </code></pre>
  
  <p>Im not sure if this is a problem or not, but I'm worried I'm wasting resources by somehow running thru this twice. Any ideas on what might be going on?</p>
  
  <p>Thanks!</p>