Cowell Computer Consulting

Get real about startup optimization

Posted by Luke Cowell on May 17, 2007 at 07:08 PM

This will be a useful read for you if you are looking to speed up the time between when you start the login process and when your key startup items are loaded.

There are a plethora of tutorials out there on how to improve your login startup times in OS X. Some suggest adding delays between startup items. Some suggest using an applescript to do your launching.

Time to usefulness

It is possible to measure the amount of time that has passed until all your login items have loaded, but let's get real, many of the startup items could be started at any point within the first few minutes logging in. Unfortunately, when your login items (from your account preferences) are executed they are all started at once. This means that most of the programs aren't ready until all the programs are ready. We should then be measuring how long it takes before you can use your key startup items, rather than timing how long it takes until all startup items are launched.

The problem with the applescript solution

I've seen some very elegant applescript solutions. For example:

 tell application "Firefox" to launch
 tell application "Apple Help" to launch

Unfortunately, when you use an applescript in this way, the applescript will scan through your applications folder to find the apps you've told it to launch. That means lots and lots of unneeded disk activity, which is your primary bottleneck on startup.

Shell script

I recommend writing a shell script. This code sucks, but it works. I've added a start delay aka. startup as this is called with the other startup items and I've added delays aka. between between the items to stagger the launch process.

#!/bin/sh

startup=15
between=1
sleep $startup
open /Applications/smcFanControl.app/
sleep $between
open /Applications/Spirited\ Away.app/
sleep $between
open /Applications/Mozy.app/Contents/Resources/Mozy\ Status.app/
sleep $between
open /Applications/Microsoft\ AutoUpdate.app/Contents/MacOS/Microsoft\ AU\ Daemon.app/
sleep $between
open /Applications/Palm/Transport\ Monitor/
sleep $between
open /Applications/iTunes.app/Contents/Resources/iTunesHelper.app/

You may need to wrap this in an applescript ala:

do shell script "mystartupscript.sh"

add this to your login items.

Pros

-I can start using quicksilver much more quickly now.

-My computer is more responsive in the first couple minutes after login.

Cons

-How often do I actually restart my computer ? Rarely, so the benefit is minimal.

-More difficult to maintain than using standard login items.

I'd also recommend that you check out Lingon for speeding up your startup in general.

http://lingon.sourceforge.net/

Update: Avi Flax has some comments about startup optimization

http://aviflax.com/post/os-x-tip-staggered-login-items/

Tags: OSX, Tips
Hierarchy: previous, next

Comments

There are 3 comments on this post. Post yours →

Thanks for the clear and useful thoughts on this topic! They helped me come up with my own approach.

...and apparently your comments don't allow HTML. OK, so here's that link:

http://aviflax.com/post/os-x-tip-staggered-login-items/

Thanks for tha tips.

Post a comment

Required fields in bold.