> I am pretty confident that switching from taking the union of a lot of > lenses to a union of strings/regexps will take care of the slowness. The > difference between 'l(r1) | l(r2) | .. | l(rn)' vs 'l(r1|r2|..|rn)' is > enormous in terms of the internal processing - when parsing the file, > the first version requires n regexp matches, whereas the second just > requires one, plus the regexps for the first version are _much_ bigger > than for the second.
A trick we do in Boomerang, which may be useful if you really do need a lens union and can't push it down into a union of regexps, is to parse (l1 | l2 | l3 | l4) as ( ( l1 | l2 ) | ( l3 | l4 ) ) instead of ( l1 | ( l2 | ( l3 | l4 ) ) ) Nate _______________________________________________ augeas-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/augeas-devel
