Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]
Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]
- Subject: Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]
- From: Paulo Andrade <email@hidden>
- Date: Fri, 13 Nov 2009 18:28:39 +0000
- Resent-cc: Cocoa-dev Mailinglist <email@hidden>
- Resent-date: Fri, 13 Nov 2009 18:39:49 +0000
- Resent-from: Paulo Andrade <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: Joar Wingfors <email@hidden>
Hello,
I'm using the CPU sampler template.
Here (http://1wzi.sl.pt) is a sample of a very simple run to prove my point.
Here's how I collected it:
- Start the app and let it fully launch (it does a few request at boot)
- Attach instruments with the CPU Sampler template
- Let it run for 30 seconds and not touch the iphone
You'll see that the time is equally divided between +[UIApplication run] and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]
Please let me know if you have any other ideas that could explain this.
Thanks a lot
Paulo Andrade
On Nov 13, 2009, at 4:40 PM, Joar Wingfors wrote:
>
> On 13 nov 2009, at 04.36, Paulo Andrade wrote:
>
>> I'm guessing that when using a NSURLConnection the framework spawns a new thread and creates a runloop for it,
>
>
> That sounds about right. I could also see that the framework might choose to keep this thread around after you've finished using it (in case you need it again later).
>
>
>> this runloop just like the runloop on the main thread is constantly running even when I'm no longer using any NSURLConnection.
>
>
> I don't believe this to be the case though. When not handling any input sources (sending / receiving data), I'd expect for this run loop (just like the run loop for the main thread) to be "parked", not consuming any (or at least not basically any) CPU.
>
> How are you running your CPU profile (what is the configuration you're using when launching Instruments), and how are you filtering your data after collecting the sample? If you want more feedback, upload the whole sample instead of a screenshot next time.
>
> j o a r
>
>
_______________________________________________
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