Making use of set_rcvar.
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sat Jan 14 16:00:52 UTC 2012
On Fri, Jan 13, 2012 at 04:49:52PM -0800, Doug Barton wrote:
> On 01/13/2012 16:32, Hiroki Sato wrote:
> > And I do not think it is a good idea to commit something related to
> > this topic while the discussion is ongoing.
> >
> > We have reached a consensus that `set_rcvar` is expensive, but for
> > whether using literal or variable we haven't.
>
> Quite frankly I'm not interested in the consensus at this point. You and
> others have brought up several justifications for the way you want to do
> it, and I've systematically pointed out that they're all wrong.
> "Consensus" doesn't mean something is right, it just means it's the
> least objectionable option, which is a terrible way to run a railroad.
>
> Chris was right that there is absolutely no question that not having to
> dereference the variable is faster. How much faster really isn't the
> point. Every little bit helps, especially on embedded/slower systems.
So, every little bit helps when it comes to boot time, but every little
bit doesn't help when it comes to reusing existing scripts?
You only think you pointed out the arguments given are wrong. Because
nobody addresses claims like 'it is 31337 to use variables, so don't do
that', doesn't mean they are valid, it means they are not even worth
addressing.
Also, we don't currently use hardcoded names consistently across all
rc.d scripts, so this is not about changing current world order.
Currently we have total mess and two ways of cleaning it up: one being
${name} usage and the other being hardcoded names. All this means it is
not about convincing you that we should move from hardcoded names to
variables, but to find convensus which method we should start using as a
rule and how to clean up what we currently have. Using your logic, I
could as well say that you provided no convincing arguments, so it of
course means we are going with ${name} option. It doesn't work like that.
To sum up.
There is currently only one candidate for a valid argument behind
hardcoded names - speed. To make it a valid argument you need to provide
a prove, because this claim may be indeed proved. Based on the prove we
can either forget about this argument if there is no measurable
difference or decide if the slowdown is acceptable (if there is one).
Are there any other arguments on the table?
For using variable there is an arguments that it will make reusing
existing scripts easier and making the code cleaner. Eliminating every
hardcoded name does help a bit with script modification and makes the
process less prone to human errors, especially because there is no
compiler to tell us something went wrong. I'm also not alone in support
for this argument.
From this summary it is quite clear to me, that if we are going to
continue this discussion, proformance claim has to be proved. Without
the prove this option is left with no valid arguments.
--
Pawel Jakub Dawidek http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20120114/ca5e55a1/attachment.pgp
More information about the freebsd-rc
mailing list