views:

24

answers:

1

Hi,

We wrote a simple OS X executable in objective c. It opens and runs very quickly when called.

We then put that executable into a .app bundle. When calling "open" from the command line on that bundle, or double clicking the app from the finder the "open" call can take upwards of 30 seconds to return.

This is especially confusing because "open" clearly starts the executable right away (I can see it running in the process list right away, and have other indications that it's doing work), but when done from the command line, the "open" command takes a long time to return, and when done from the Finder the icon will bounce for a very long time before acting normal.

I know the executable itself still opens very quickly because calling "open" on the executable inside my bundle returns very quickly, however calling it on the .app runs the code right away but takes 30 seconds or so to return.

Has anyone run into this before? Do you have any suggestions for what could cause something like this? I've not been able to see anything funny in the bundle structure or the plist, but maybe I'm missing something.

Thanks,

A: 

Try collecting around 10s of system-wide sampling data with Shark during this 30 second hang and see where time is being spent - this should give you a pretty big clue as to why you have a problem with launch time.

Paul R