[augeas-devel] Simplify get and speed up processing of large files

David Lutterkort lutter at redhat.com
Tue Feb 17 18:54:04 UTC 2009


These patches were prompted by the fact that /etc/services on Fedora is
huge (~10k lines) and processing it is somewhat slow. The patches also
clean up how we track substrings during get - the previous split structures
were kinda hackish and led to lots of unnecessary regexp matches.

The number of times we call the regexp matcher is now almost minimal; more
importantly, by using the re_registers reported by the regexp matcher
directly, tracking of the piece of text we are currently working on has
been greatly simplified.

The biggest performance improvement comes from eliminating matching the
entire input string if the toplevel lens is of the form (l)*; that is
permissible since get_quant_star will detect when it did not process the
entire input.

A similar change should be made to put, though there matters are
complciated slightly by the fact that we need to track both the position in
the text and the position in the tree.

David




More information about the augeas-devel mailing list