Drop-in replacement boot scripts in Perl. Worthwhile?
Posted: 4. Aug 2011, 19:48
Salix performs very well once the desktop is up and running (at least when you use the noop or deadline schedulers, cfq seems to have problems with something). But like Slackware, its boot performance isn't so great compared to e.g. Debian. A typical boot on Salix takes my netbook about 45 seconds; on Debian, more like 25. Most of this time appears to be spent on the multi-user boot scripts.
(Note that I use the "compact" option with LILO. Otherwise boot would take several minutes.)
Anyway I don't consider this a huge issue, since booting is still a tiny fraction of the time I spend in front of the computer. But I find myself wondering if there's anything I could do to improve boot speed a bit. So...
Back when I was using Zenwalk, I had this idea for a set of boot scripts - rc.S, rc.M, etc. - written in Perl, which would act as a drop-in replacement for the normal bash scripts. I'd heard Perl was interpreted a few hundred times faster than bash, and figured this might translate into some time savings.
I'm not a wiz with Perl, but I know enough to get by; I don't think it would be difficult for me to rewrite Salix's main rc.X scripts in it. But before I spend any time on that, I want to know: is it actually worth it? Would Perl's faster parsing result in a faster boot, or would it just not matter, due to the lack of parallelism in the Salix initscripts?
P.S. Don't worry, I'm fully aware that tampering with boot scripts can result in a shattered install. Actually I managed to do that last time.
(Note that I use the "compact" option with LILO. Otherwise boot would take several minutes.)
Anyway I don't consider this a huge issue, since booting is still a tiny fraction of the time I spend in front of the computer. But I find myself wondering if there's anything I could do to improve boot speed a bit. So...
Back when I was using Zenwalk, I had this idea for a set of boot scripts - rc.S, rc.M, etc. - written in Perl, which would act as a drop-in replacement for the normal bash scripts. I'd heard Perl was interpreted a few hundred times faster than bash, and figured this might translate into some time savings.
I'm not a wiz with Perl, but I know enough to get by; I don't think it would be difficult for me to rewrite Salix's main rc.X scripts in it. But before I spend any time on that, I want to know: is it actually worth it? Would Perl's faster parsing result in a faster boot, or would it just not matter, due to the lack of parallelism in the Salix initscripts?
P.S. Don't worry, I'm fully aware that tampering with boot scripts can result in a shattered install. Actually I managed to do that last time.
