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

Re: Operations Beachball


  • Subject: Re: Operations Beachball
  • From: Joar Wingfors <email@hidden>
  • Date: Wed, 05 Dec 2012 00:57:17 -0800

What happens if you remove the "isCancelled" checks?
How do you create your operation queue?
What is the max concurrent operation count of the queue? If NSOperationQueueDefaultMaxConcurrentOperationCount, what happens if you set it to (processorCount) instead?
When you take a CPU sample of the process, what are your worker threads mainly doing (work, or being stuck)?

Joar

On 4 dec 2012, at 23:46, Gerriet M. Denkmann <email@hidden> wrote:

>
> On 5 Dec 2012, at 01:29, Jens Alfke <email@hidden> wrote:
>
>>
>> On Dec 4, 2012, at 3:48 AM, Gerriet M. Denkmann <email@hidden> wrote:
>>
>>> My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue.
>>> I would expect that the app thus remains responsive, but sometimes it is not.
>
>
> I made a test project with this Operation:
>
> @implementation GmdOperationBasis
> - (void)main
> {
> 	if ( [ self isCancelled ] ) return;
> 	double sum = 8;
> 	for( NSUInteger i = 0; i < 133833333; i++ )
> 	{
> 		if ( [ self isCancelled ] ) return;
> 		double j = (double)i;
> 		sum += sqrt(j);
> 	};
> }
> @end
>
> When I add less than 8 operations to the queue, all is fine.
>
> When I add 8 or more operations to NSOperationQueue (using NSOperationQueueDefaultMaxConcurrentOperationCount concurrent ops) ,
> - then switch to some other app,
> - then try to make my app active again, I get a beach-ball.
>
> My app becomes responsive again, when all operations have finished.
>
> processorCount = 8 (as reported by NSProcessInfo).
>
> 10.8.2. Xcode 4.5.2.
>
>
> Kind regards,
>
> 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: Operations Beachball
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >Operations Beachball (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Operations Beachball (From: Mike Abdullah <email@hidden>)
 >Re: Operations Beachball (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Operations Beachball (From: Roland King <email@hidden>)
 >Re: Operations Beachball (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Operations Beachball (From: Jens Alfke <email@hidden>)
 >Re: Operations Beachball (From: "Gerriet M. Denkmann" <email@hidden>)

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