Re: Beachball on Lengthy Task
Re: Beachball on Lengthy Task
- Subject: Re: Beachball on Lengthy Task
- From: Marcel Weiher <email@hidden>
- Date: Wed, 8 Apr 2009 08:01:07 -0700
On Apr 5, 2009, at 14:59 , Andrew Farmer wrote:
On 05 Apr 09, at 08:17, Michael Ash wrote:
On Sun, Apr 5, 2009 at 9:33 AM, Kirk Kerekes <email@hidden>
wrote:
[Use a separate process instead of a separate thread]
I recommend avoiding this if possible. Processes are a somewhat
scarce
resource on OS X (only 266 per user by default, looks like) and you
don't want to be using up more than you have to. It's unfortunate
because it can make things easier as you say.
It's also not particularly effective if your lengthy task involves
any significant processing of data that's been created within your
application. [..examples..]
Yes, you do need to take a little bit of care that your communication
is balanced with your processing. However even simple pipe-based IPC
is blindingly fast on OS X and most if not all Unix systems these
days: on my MBP it clocks in at > 1GB/s.
And while you probably don't want to spawn tens or hundreds of
processes, one or two should certainly be OK and give you the benefits
of process isolation for your long-runing task. Heck, Google does it
with Chrome, so it must be good, right? ;-)
Marcel
_______________________________________________
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