On Tue, 2008-08-26 at 22:01 +0100, Daniel P. Berrange wrote:
> While I can see why it is useful to gather these entries
logically, it's not
> very optimised for the parser. Eventually, all this will be compiled into a
> huge regexp, so it's more efficient to regroup entries by type and feed the
> functions with regexps instead of strings, like
Is performance really that much of a problem ? The libvirt config file
only has 20 or so different settings, and while we'll add more I can't
see it getting very much larger. Changing these settings is also not
something that would be done on a frequent basis / performance critical
path. I find it more readable to group them by functional area unless
there is a serious real world performance issue.
We've seen some cases where it made a _dramatic_ difference. But if it's
fast enough now, I wouldn't worry about it - just keep that in mind when
either running augparse or augtool on it becomes unbearably slow.
David