• 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: NSOperation Efficiency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOperation Efficiency


  • Subject: Re: NSOperation Efficiency
  • From: Mike Abdullah <email@hidden>
  • Date: Tue, 04 Dec 2012 18:55:38 +0000

If your operations are purely CPU-bound, the whole point of GCD is to manage this for you. With the default number of concurrent operations, NSOperationQueue does exactly that. Have you tried with that setting?

On 4 Dec 2012, at 18:15, "Gerriet M. Denkmann" <email@hidden> wrote:

> I have an app which uses NSOperations inside an NSOperationQueue. These operations do not do any I/O - just Cpu. No swapping is taking place.
>
> When I set [ self.operationQueue setMaxConcurrentOperationCount: 1 ] each operation takes on average 200 msec., measured by NSDate.
>
> With 2 concurrent operations, it takes not 100 msec but 110 - an extra 10%. Ok - some overhead is to be expected.
>
> With 4 ops it takes 70 instead of 50 - overhead 40% - rather a lot.
> With 8 ops it takes 60 instead of 25 - overhead 140%. or: 40% of the cpu is used by my operations, 60% is used by whom? And for what?
>
> Is this to be expected? Or does my app has some hidden flaws? If so, where should I start looking?
>
> Gerriet.
>
>
> _______________________________________________
>
> 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


_______________________________________________

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

  • Follow-Ups:
    • Re: NSOperation Efficiency
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >NSOperation Efficiency (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Operations Beachball
  • Next by Date: Re: Beachballing 2
  • Previous by thread: Re: NSOperation Efficiency
  • Next by thread: Re: NSOperation Efficiency
  • Index(es):
    • Date
    • Thread