• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mystery Threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Mystery Threads (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Mystery Threads (From: Quincey Morris <email@hidden>)
 >Re: Mystery Threads (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Mystery Threads (From: Quincey Morris <email@hidden>)
 >Re: Mystery Threads (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Mystery Threads (From: Roland King <email@hidden>)
 >Re: Mystery Threads (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Mystery Threads
  • Next by Date: Playground gets permission error
  • Previous by thread: Re: Mystery Threads
  • Next by thread: Re: Mystery Threads
  • Index(es):
    • Date
    • Thread