Subject: rc_subr optimization
To: None <>
From: Pavel Cahyna <>
List: tech-userlevel
Date: 08/11/2004 15:38:36

i've implemented a simple optimization of rc.subr:

- move /etc/rc.subr to /etc/rc.subr.real
- replace /etc/rc.subr with this:

if ${_rc_subr_loaded:-false}; then
	. /etc/rc.subr.real

All rc scripts should use /etc/rc.subr as before.

I think this should be completely transparent and avoid problems mentioned
in the log message for rev. 1.59 .

This makes /etc/rc execute in 38 seconds (47 second before) on a
486DX2/50 with NetBSD 1.6. On a Pentium 100 with 2.0_BETA it saves cca 6
seconds, on a Pentium 2 /400 MHz one second.

I think this saving could be even more important for even slower machines
such as Vax or Motorola 68030.