Re: Spoon-feeding NSURLConnection
Re: Spoon-feeding NSURLConnection
- Subject: Re: Spoon-feeding NSURLConnection
- From: Mark Pauley <email@hidden>
- Date: Thu, 28 Jun 2012 10:33:12 -0700
Did you by chance turn on http pipelining with NSMutableURLRequest -setHTTPShouldUsePipelining?
Make sure you set this to NO on your long-running requests.
You might just be hitting head of line blocking, which we can't really do anything about. If you have long running requests, but still want pipelining for the rest of your short requests, you may be able to partition your pool as Quinn describes.
_Mark
On Jun 28, 2012, at 9:45 AM, Jens Alfke <email@hidden> wrote:
>
> On Jun 28, 2012, at 1:43 AM, Quinn The Eskimo! wrote:
>
>> NSURLConnection's connection cache is definitely per thread. However, I'm not sure if that's looked at before control transfers over to the loader thread or not. It's definitely worth a shot IMO.
>
> Hm, interesting.
>
>> If that doesn't pan out my standard hackish workaround for problems like this is to change the URL from "foo.bar.com" to "foo.bar.com." (note the trailing dot). These resolve to the same thing, but they result in different connection cache keys. So you could use the trailing dot version for long-running requests and the normal version for normal requests. Yergh!
>
> Brilliant! I was trying to think of some way to force it to use a different connection, but didn't think of the trailing "." I'll give it a try.
>
>> Regardless of what happens on the workaround front, please make sure you file a bug about this.
>
> Already did — rdar://11762079
>
> —Jens
>
> _______________________________________________
> 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
_______________________________________________
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