Forcing CLLocationManager updates - does it help or hurt?
- by Steve N
I've been trying to find any way to optimize the performance of my location-based iPhone application and have seen some people mention that you can force location updates by starting and stopping your CLLocationManager. I need the best accuracy I can get, and the user in my case would probably like to see updates every few seconds (say, 10 seconds) as they walk around. I've set the filters accordingly, but I notice that sometimes I don't get any updates on the device for quite some time.
I'm testing the following approach, which forces an update when a fixed time interval passes (I'm using 20 seconds). My gut tells me this really won't help me provide more accurate updates to the user, and that just leaving CLLocationManager running all the time is probably the best approach.
- (void)forceLocationUpdate {
[[LocationManager locationManager] stopUpdates];
[[LocationManager locationManager] startUpdates];
[self performSelector:@selector(forceLocationUpdate) withObject:nil afterDelay:20.0];
}
My question is- does forcing updates from CLLocationManager actually improve core location performance? Does it hurt performance? If I'm outside in an open field with good GPS reception, will this help then? Does anyone have experience trying this?
Thanks in advance,
Steve