]> git.ipfire.org Git - thirdparty/man-pages.git/commit
bash_aliases: grep_*(): Optimize
authorAlejandro Colomar <alx.manpages@gmail.com>
Sun, 14 Nov 2021 13:54:24 +0000 (14:54 +0100)
committerAlejandro Colomar <alx.manpages@gmail.com>
Sun, 14 Nov 2021 13:54:26 +0000 (14:54 +0100)
commit2823cdab8888171e4fc8523f5d08f080487009cc
tree602d011a758026ba0ffa7d9f6abbe6e1630f441a
parent6ff6f43d68164f99a8c3fb66f4525d145571310c
bash_aliases: grep_*(): Optimize

Using grep first to reduce the files on which pcregrep is run
optimizes considerably the performance of these functions.

If a file doesn't contain the name of a function,
which can easily be checked with grep,
it won't possibly contain the function prototype or definition,
which is much slower to search,
since it implies multiline pcregrep search.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
scripts/bash_aliases