Re: URLSession on iOS 10
Re: URLSession on iOS 10
- Subject: Re: URLSession on iOS 10
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Wed, 23 Nov 2016 09:01:25 +0000
On 23 Nov 2016, at 00:47, Shawn Erickson <email@hidden> wrote:
> I throttle things using an operation queue set to 10 current operations …
To be clear, NSURLSession was designed to /not/ require the client to throttle requests. You should be able to dump as many requests as you like into a session and NSURLSession throttles them internally.
The only place where this doesn’t hold true is background sessions, where the bookkeeping associated with the background session means that starting many thousands of requests engenders a noticeable performance penalty. In general, I recommend that you use fewer, larger requests in a background session, as explained by the following post.
<https://forums.developer.apple.com/thread/14853>
Now, if you want to throttle requests for other reasons that’s absolutely fine. However, you shouldn't /need/ to do that.
* * *
@Rick Mann, It seems like something is going wrong with NSURLSession here. I’d appreciate you filing a bug about this. It’d be great if you could include a small test project that illustrates the issue.
<https://developer.apple.com/bug-reporting/>
Please post the bug number, just for the record.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden