Re: [NSTask] -launch return
Re: [NSTask] -launch return
- Subject: Re: [NSTask] -launch return
- From: Greg Guerin <email@hidden>
- Date: Tue, 9 Jun 2009 23:44:08 -0700
Erg Consultant wrote:
I am willing to do the "pre-launch Rosetta" hack to work around but
if it takes 2-3 seconds to launch and I do a exec/waitpid or
whatever on my dummy process, then my main app is going to take up
to 3 seconds to launch which is unacceptably slow.
There Ain't No Such Thing As A Free Launch.
Either you pay the cost in waiting for the dummy process to
terminate, or you pay it in waiting for the real child process to
start working. Pick one. Rosetta takes a finite time to load and
initialize, and you can't eliminate it if you need to run code under
Rosetta. The best you can do is to mask Rosetta's initialization
time by doing something else useful at the same time.
After the initial load of Rosetta, the time should be less, as you
noted yourself here:
http://lists.apple.com/archives/cocoa-dev/2009/Jun/msg00518.html
"If I run the exact same code a second time by quitting everything
and running it again - everything works (becaus Rosetta is already
running)."
If you launch the dummy process earlier, and overlap Rosetta
initialization with other work your app needs to do before it
launches the real child process, then that seems like a fairly easy
improvement. However, the overall best-case time will still be
limited by Rosetta's unavoidable first-use cost. The only certain
way to avoid Rosetta's costs are to not use it.
-- GG
_______________________________________________
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