title: Cloudkit Fetch very slow
body: <p>Running the below code to fetch data from Cloudkit, at the moment it is taking a long to populate a tableView, depending on how many results there are, but if there are over 15 results it takes 10 seconds plus. Are they any ways I can speed this up?</p>
  
  <p>This is my fetch func:</p>
  
  <pre><code>func loadData() {
          venues = [CKRecord]()
           let location = locationManager.location
  
          let radius = CLLocationDistance(500)
  
          let sort = CKLocationSortDescriptor(key: "Location", relativeLocation: location!)
  
          let predicate = NSPredicate(format: "distanceToLocation:fromLocation:(%K,%@) &lt; %f", "Location", location!, radius)
  
          let publicData = CKContainer.defaultContainer().publicCloudDatabase
  
          let query = CKQuery(recordType: "Venues", predicate: predicate )
  
          query.sortDescriptors = [sort]
  
          publicData.performQuery(query, inZoneWithID: nil) { (results:[CKRecord]?, error:NSError?) in
              if let venues = results {
                  self.venues = venues
                  dispatch_async(dispatch_get_main_queue(), {
                      self.tableView.reloadData()
                      self.refreshControl.endRefreshing()
                      self.tableView.hidden = false
                  })
              }
          }
      }
  </code></pre>
  
  <p>This is my tableView func:</p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
          let cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! NearMe2ViewCell
  
          if venues.count == 0 {
  
  
              return cell
          }
  
          let venue = venues[indexPath.row]
  
  
  
  
          print(indexPath.row)
  
  
          let venueLocation = venue["Location"] as? CLLocation
          let venueTitle = (venue["Name"] as! String)
          let venueImages = venue["VenuePhoto"] as! CKAsset
  
          let userLocation = locationManager.location
          let distanceBetween: CLLocationDistance = (venueLocation!.distanceFromLocation(userLocation!))
          self.venueDistance = String(format: "%.f", distanceBetween)
  
          cell.venueDistance?.text = venueDistance
          cell.venueName.text = venueTitle
          cell.venueImage?.image = UIImage(contentsOfFile: venueImages.fileURL.path!)
  
  
          return cell
  
  
      }
  </code></pre>