Re: Mystery Threads
Re: Mystery Threads
- Subject: Re: Mystery Threads
- From: Quincey Morris <email@hidden>
- Date: Fri, 30 Sep 2016 11:33:58 -0700
- Feedback-id: 167118m:167118agrif8a:167118sPooMdzZJm:SMTPCORP
On Sep 30, 2016, at 02:57 , Gerriet M. Denkmann <email@hidden> wrote:
>
> dispatch_apply(8,…):
> My function is running 3090 msec and blocked 970 ms.
> And with dispatch_apply(20,000,…):
> My function is running 196 msec and blocked 27 ms.
In a way, this is good news, because a difference that gross ought to be relatively easy to account for. Clearly there is nothing subtle about the difference between the two scenarios.
> Any ideas where to look for a reason?
The next step is probably to clarify the times between:
a. Accumulated execution time — the amount of time your code actually spends executing in CPUs.
b. Elapsed time in your process — the amount of time that’s accounted for by your process, whether executing or waiting.
c. Elapsed time outside your process — the amount of time that’s accounted for by system code, also whether executing or waiting.
You can also play around with change isolation. Instead of changing two contextual conditions (the number of dispatch_appy calls, the number of iterations in a single block’s loop), change only one of them and observe the effect in Instruments.
You can also try out some other instruments speculatively. For example, is there a different pattern in the Allocations instrument, indicating that one form of your code is doing vast numbers of memory allocations for some (unknown) reason. Or is I/O being doing, unexpectedly?
Basically, at this point, you’re looking for a lever.
_______________________________________________
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