[augeas-devel] load specific lens

Frederik Wagner fnerdwq at googlemail.com
Thu Mar 18 14:24:47 UTC 2010


On Tue, Mar 16, 2010 at 1:39 AM, David Lutterkort <lutter at redhat.com> wrote:
> On Sun, 2010-03-14 at 16:35 +0100, Frederik Wagner wrote:
>> On Fri, Mar 12, 2010 at 2:15 AM, David Lutterkort <lutter at redhat.com> wrote:
>> > On Wed, 2010-03-10 at 16:25 +0100, Frederik Wagner wrote:
>> >> On Wed, Mar 10, 2010 at 9:46 AM, Frederik Wagner <fnerdwq at googlemail.com> wrote:
>> >>
>> > Where are you seeing the slowdown ? With augtool or augparse ?
>>
>> in both. It is due to the this line:
>>
>>  let key_re = /[A-Za-z0-9_]+(\[[0-9]+\])?/ - "unset" - "export" - key_wa
>>
>> each additional word which is 'substracted' (so each additional word
>> in "key_wa"), it becomes slower, using up more and more memory (an
>> makes my poor old laptop swap like mad)
>>
>> I do not find a way around this construct...
>
> Yes, regexp subtraction is pretty expensive, since it leads to pretty
> big regular expressions; you can make it a little lighter by writing
>
>        let key_re = /[A-Za-z0-9_]+(\[[0-9]+\])?/ - /unset|export|
>        key_wa/
>
> Not sure how much of a performance gain it is, though.

no, it doesn't change anything, at least not noticable...

Bye,
Frederik




More information about the augeas-devel mailing list