That is great news. I really didn't know that.
But that's only half of what I was mentioning i my post.
In the boot process, even the fastest computers can have bottlenecks (with I/O - IRQ - whatever) and thus make the boot speed not limited by the shell running the scripts. That isn't ,obviously, the case with Roy Marples' sparc64 running Gentoo/FreeBSD.
With the use of more recent and much, in all, faster computers, that change in the boot scripts is going to help a lot.
When I wrote my post I was mentioning these shell scripts:
Code: Select all
$ file /usr/lib/portage/bin/*|grep shell
/usr/lib/portage/bin/dobin: Bourne-Again shell script text executable
/usr/lib/portage/bin/doconfd: Bourne-Again shell script text executable
/usr/lib/portage/bin/dodir: Bourne-Again shell script text executable
/usr/lib/portage/bin/dodoc: Bourne-Again shell script text executable
/usr/lib/portage/bin/doenvd: Bourne-Again shell script text executable
/usr/lib/portage/bin/doexe: Bourne-Again shell script text executable
/usr/lib/portage/bin/dohard: Bourne-Again shell script text executable
/usr/lib/portage/bin/doinfo: Bourne-Again shell script text executable
/usr/lib/portage/bin/doinitd: Bourne-Again shell script text executable
/usr/lib/portage/bin/doins: Bourne-Again shell script text executable
/usr/lib/portage/bin/dolib: Bourne-Again shell script text executable
/usr/lib/portage/bin/dolib.a: Bourne-Again shell script text executable
/usr/lib/portage/bin/dolib.so: Bourne-Again shell script text executable
/usr/lib/portage/bin/doman: Bourne-Again shell script text executable
/usr/lib/portage/bin/domo: Bourne-Again shell script text executable
/usr/lib/portage/bin/dosbin: Bourne-Again shell script text executable
/usr/lib/portage/bin/dosed: Bourne-Again shell script text executable
/usr/lib/portage/bin/dosym: Bourne-Again shell script text executable
/usr/lib/portage/bin/ebuild.sh: Bourne-Again shell script text executable
/usr/lib/portage/bin/ecompress: Bourne-Again shell script text executable
/usr/lib/portage/bin/ecompressdir: Bourne-Again shell script text executable
/usr/lib/portage/bin/emake: Bourne-Again shell script text executable
/usr/lib/portage/bin/emerge-webrsync: Bourne-Again shell script text executable
/usr/lib/portage/bin/env-update.sh: Bourne-Again shell script text executable
/usr/lib/portage/bin/etc-update: Bourne-Again shell script text executable
/usr/lib/portage/bin/find-requires: Bourne shell script text executable
/usr/lib/portage/bin/fixdbentries: Bourne-Again shell script text executable
/usr/lib/portage/bin/fowners: Bourne-Again shell script text executable
/usr/lib/portage/bin/fperms: Bourne-Again shell script text executable
/usr/lib/portage/bin/md5check.sh: Bourne-Again shell script text executable
/usr/lib/portage/bin/misc-functions.sh: Bourne-Again shell script text executable
/usr/lib/portage/bin/newbin: Bourne-Again shell script text executable
/usr/lib/portage/bin/newconfd: Bourne-Again shell script text executable
/usr/lib/portage/bin/newdoc: Bourne-Again shell script text executable
/usr/lib/portage/bin/newenvd: Bourne-Again shell script text executable
/usr/lib/portage/bin/newexe: Bourne-Again shell script text executable
/usr/lib/portage/bin/newinitd: Bourne-Again shell script text executable
/usr/lib/portage/bin/newins: Bourne-Again shell script text executable
/usr/lib/portage/bin/newlib.a: Bourne-Again shell script text executable
/usr/lib/portage/bin/newlib.so: Bourne-Again shell script text executable
/usr/lib/portage/bin/newman: Bourne-Again shell script text executable
/usr/lib/portage/bin/newsbin: Bourne-Again shell script text executable
/usr/lib/portage/bin/portage_gpg_update.sh: Bourne-Again shell script text executable
/usr/lib/portage/bin/prepall: Bourne-Again shell script text executable
/usr/lib/portage/bin/prepalldocs: Bourne-Again shell script text executable
/usr/lib/portage/bin/prepallinfo: Bourne-Again shell script text executable
/usr/lib/portage/bin/prepallman: Bourne-Again shell script text executable
/usr/lib/portage/bin/prepallstrip: Bourne-Again shell script text executable
/usr/lib/portage/bin/prepinfo: Bourne-Again shell script text executable
/usr/lib/portage/bin/preplib: Bourne-Again shell script text executable
/usr/lib/portage/bin/prepman: Bourne-Again shell script text executable
/usr/lib/portage/bin/prepstrip: Bourne-Again shell script text executable
/usr/lib/portage/bin/quickpkg: Bourne-Again shell script text executable
They are called many times when emerging and, as mentioned by Tavis Ormandy in
this script,
ksh massively out performs bash.
Well, it does. I made a few rough tests using most of the shells available in portage and ksh is the fastest shell for scripts in which you call external programs many times.
As a very basic example:
The mentioned script without the shell changing part took 46 seconds running with ksh and 2 minutes with bash, for the same binary file of course.
As I recall, bash was the shell that performed worst in this case.
Trying to stay on topic, I really love Gentoo and use as my only OS in my laptop and my home server.
I am just trying to make it better by showing my point of view.
I don't know how much of the bash-like parts of the mentioned above scripts would have to be changed to make it a "pure" /bin/sh script.
My idea is, ksh is a superset of
shell as is bash. If the scripts could be reduced to a minimum subset, the emerging process would speed a lot by using the fastest
shell available.
Please, take this just as a thought not as criticism.
Thanks marc_alec for the referring Roy Marples' work and Roy Marples for the obvious speedup coming somewhere in the next versions of baselayout.