Shell startup times, part 2

Following up on Saturday's post and various other blog entries about bash. While arguing with Anton about bash being slow, I discovered that /etc/bash_completion was sourced twice when starting a shell on my laptop; once in /etc/bash.bashrc, and once in ~/.bashrc. This is Debian bug #430501 - the suggestion there is that /etc/skel/.bashrc should change to check whether /etc/bash_completion had already been included. So, that saves 0.27 seconds. tim@regulus:~$ time bash -i -c exit exit real 0m0....

Shell startup times

So, a benchmark. tim@regulus:~$ time zsh -i -c exit real 0m0.064s user 0m0.048s sys 0m0.008s tim@regulus:~$ time bash -i -c exit exit real 0m0.540s user 0m0.436s sys 0m0.100s Both shells had their respective completion systems enabled. (Without them turned on, bash actually beats zsh... but the times are small enough that it doesn't matter.) These times are with a warm disk cache - the first time through both shells were slower....