开发者

Why would an OS X bundle take about 30 seconds to open?

开发者 https://www.devze.com 2022-12-24 03:03 出处:网络
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,

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 开发者_JAVA技巧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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号