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.270s user 0m0.240s sys 0m0.032s
This is still ages when compared to zsh. A solution is proposed in Debian bug #467231 - the functions could be loaded dynamically when they are first used, instead of all at once. I may try this next.
One sandwich and cup of tea later: it works, and bash now beats zsh's time.
tim@regulus:~$ time bash -i -c exit exit real 0m0.047s user 0m0.036s sys 0m0.004s
Posted: 24 Mar 2008 00:00 |
| < | March 2008 | > | ||||
| Su | Mo | Tu | We | Th | Fr | Sa |
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | |||||
Tim Retout tim@retout.co.uk
JabberID: tim@retout.co.uk
I'm afraid I have turned off comments for this blog, because of all the spam. Let's face it, I didn't read them anyway. Feel free to email me.