Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jan 2012 18:19:49 +0000
From:      Chris Rees <utisoft@gmail.com>
To:        Pawel Jakub Dawidek <pjd@freebsd.org>
Cc:        freebsd-rc@freebsd.org, Doug Barton <dougb@freebsd.org>
Subject:   Re: Making use of set_rcvar.
Message-ID:  <CADLo839HrGS-Nb_9XcBXO4wGMLMa4UrUMxSVR9qm-Zsiq6PvFg@mail.gmail.com>
In-Reply-To: <20120113171255.GA1694@garage.freebsd.pl>
References:  <4F08C95F.6040808@FreeBSD.org> <20120108.081216.1547061187942402256.hrs@allbsd.org> <4F0A22D8.8090206@FreeBSD.org> <20120109.223510.1979757999064039809.hrs@allbsd.org> <4F0FFFF7.4090105@FreeBSD.org> <20120113141058.GE1662@garage.freebsd.pl> <CADLo839mmhFS_UV04yGFv=5Zu9gwXtaRpQvKdmO1pL-mDO3Zsg@mail.gmail.com> <20120113171255.GA1694@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13 Jan 2012 17:14, "Pawel Jakub Dawidek" <pjd@freebsd.org> wrote:
>
> On Fri, Jan 13, 2012 at 04:41:32PM +0000, Chris Rees wrote:
> > On 13 Jan 2012 14:12, "Pawel Jakub Dawidek" <pjd@freebsd.org> wrote:
> > > Please don't. Touching so many rc.d files is PITA during mergemaster.
> > > If we want to do that, let's do that once. The current consensus as I
> > > see it, is that you are the only one wanting to hardcode names and th=
ere
> > > are many in favour of using variables.
> > >
> >
> > Well.... hardcoding IS faster.
>
> Can you prove it with ministat(1)? What difference are we talking about?
>

I sense I'm about to get ripped a new one...

Obviously dereferencing a variable has a cost.=A0 Normally, no big deal,
but I'm happy to research it later.

These scripts are run through a huge number of times at various
stages, and any slowdown is detrimental.

Also, I tend to agree with Doug on the <<search and replace>> issue.
If we really want to reuse code like that then we need to start using
m4 or something (I'm only being half facetious here).

Code reuse is great, but that's not really the case here.

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo839HrGS-Nb_9XcBXO4wGMLMa4UrUMxSVR9qm-Zsiq6PvFg>