Re: Data downloading performance
Re: Data downloading performance
- Subject: Re: Data downloading performance
- From: Kyle Sluder <email@hidden>
- Date: Fri, 16 Jul 2010 15:56:46 -0700
On Jul 16, 2010, at 3:46 PM, Rafael Cerioli <email@hidden> wrote:
> Hi everybody,
>
> What would be the most efficient way to download data without blocking the UI (I'm targeting old iPhone/iPod devices) ?
>
> - using a NSURLConnection seams nice, but as it calls its delegate (-connection:didReceiveData:) on the main thread, it has to take a lock on the main thread some times, hasn't it?
No. Read up on NSRunLoop.
>
> - then how about using NSURLConnection in background threads, like with +[NSThread detachNewThreadSelector:toTarget:withObject:] ?
Don't do this. NSURLConnection's synchronous API is buggy, as a web search will tell you.
--Kyle Sluder
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden