• 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: Quincey Morris <email@hidden>
  • Date: Wed, 05 Dec 2012 01:45:43 -0800

On Dec 5, 2012, at 01:09 , "Gerriet M. Denkmann" <email@hidden> wrote:

> When I press a button "Start" this gets done:
>
> 	self.start = [ NSDate date ];
> 	for( NSUInteger i = 0; i < self.nbrWork; i++ )
> 	{
> 		GmdOperationBasis *m2 = [ [ GmdOperationBasis alloc ]  init ];
> 		[ self.operationQueue  addOperation: m2 ];
> 	};

So operations are being created and queued while some already running, if I understand correctly. That means your two possible sources of overhead (setup and concurrency) might well be interacting badly with each other.

> No idea. But NSProcessInfo reports: processorCount = 8.
>
> About this Mac says: MacBook Pro; Retina, Mid 2012; Processor  2.3 GHz Intel Core i7; Memory  8 GB 1600 MHz DDR3.

That means you have 4 cores. In that case, it doesn't seem surprising that the performance increase would be less dramatic after 3-4 threads, since your operations are intensely compute-bound.

> This I cannot do.
> When I use NSOperationQueueDefaultMaxConcurrentOperationCount (i.e. letting NSOperationQueue decide what is appropriate) then my app will block (see thread: Operations Beachball).

Yeah, it's a difficult problem.




_______________________________________________

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: 
 >NSOperation Efficiency (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: NSOperation Efficiency (From: Kyle Sluder <email@hidden>)
 >Re: NSOperation Efficiency (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: NSOperation Efficiency (From: Kyle Sluder <email@hidden>)
 >Re: NSOperation Efficiency (From: Jens Alfke <email@hidden>)
 >Re: NSOperation Efficiency (From: Kyle Sluder <email@hidden>)
 >Re: NSOperation Efficiency (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: NSOperation Efficiency (From: "Gerriet M. Denkmann" <email@hidden>)

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