New configuration parser ready

Russ Allbery rra at stanford.edu
Wed Sep 4 00:09:44 UTC 2002


Jeffrey M Vinocur <jeff at litech.org> writes:
> On Tue, 3 Sep 2002, Russ Allbery wrote:

>> checks things like making sure that there are no unrecognized keys in
>> the inn.conf file.  (This is a somewhat slow operation, so I don't
>> think it's necessary to do every time inn.conf is loaded, but it could
>> be done there if we wanted.)

> *thinks*  Why is this slow?

Well, part of the problem is that the code isn't entirely written yet to
obtain all of the keys used in a configuration block.  But that should be
easy to fix.  (It's already stubbed in; I just haven't written it yet
because I didn't need it for the first round of things.)

The rest of the problem is that the new inn.conf parser uses a table of
configuration parameters that would be checked against, and right now it's
not sorted usefully because it's sorted by what portions of INN use
various configuration entries to make it easier down the road to break the
monolithic inn.conf apart into different configuration groups for
different subsystems.  So it's a linear search for each parameter.

If we wanted, though, we could discard or separately maintain the
information about who uses what and pre-sort the table, at which point we
can do a binary search and it's much faster.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list