title: iOS MapBox maps lagging
body: <p>I'm using MapBox for my app. I need to draw a straight line between my current position and given marker. This line should be updated with every location update. So i have written this code </p>
  
  <pre><code>func mapView(mapView: MGLMapView, didUpdateUserLocation userLocation: MGLUserLocation?){
      drawPath()        
  }
  
  func drawPath(){
      if(shouldDrawLine){      
          mapView.removeOverlay(line)
          let userLoaction = mapView.userLocation!.coordinate
          linePoints = [userLoaction, destination]
          shouldDrawLine = true
          line = MGLPolyline(coordinates: &amp;linePoints, count: 2)
          mapView.addOverlay(line)
      }
  }
  </code></pre>
  
  <p>And I got picture like this:</p>
  
  <p><a href="http://i.stack.imgur.com/EQ97y.png" rel="nofollow"></a></p>
  
  <p>But it's lagging so much! Black line is blinking every couple seconds. </p>
  
  <p>How can i optimise it?</p>