Subject: Re: Proposed rc.d changes....
To: Greywolf <email@example.com>
From: Luke Mewburn <firstname.lastname@example.org>
Date: 02/20/2001 14:36:04
On Mon, Feb 19, 2001 at 06:50:52PM -0800, Greywolf wrote:
> I've just gone back and re-read the thread for this, well over six months
> since it got implemented (nigh approaching a year), and I have a serious
> question here:
> - Has anyone at all considered the potential of, at system rc
> run time,
> loading /etc/defaults/rc.conf
> loading /etc/rc.conf
> ONCE and then just _sourcing_ the scripts with the same shell,
> with perhaps a macro which tests to see if the requisite routine
> has been loaded in order to avoid multiple sourcing/reading/
> I'm looking into such a solution; if nobody else gets there first, I'll
> see what I can submit on this front. It's not obvious to me at all that
> this has been done or even attempted.
> It'd probably significantly decrease the startup time, especially on less
> well-endowed machines.
I have been working on a patch to do the following:
- Only source /etc/rc.conf once (tested in load_rc_config
with a dinky multiple inclusion test). This effectively
means that /etc/defaults/rc.conf only gets loaded once
because /etc/rc.conf is what loads it.
- If _rc_fast_and_loose != "", source all rc.d scripts into
the current shell rather than into subshells. This might
help on machines where forking is inefficient.
- Other minor optimisations (use case instead of if to
compare strings, etc)
I've been meaning to ask for testing from users with much slower
machines than my laptop (a PIII-700), because I didn't notice any
difference with my laptop with the patch.
Any takers? (Or should I just post it here and have people post their
before & after results? :)