pacman/scripts
Dave Reisner 9dd42dc0da makepkg: remove subshelling from check_option and friends
Instead of creating a subshell for each of these checks (of which there
are many), pass in an expected value and make the check_* function do
the comparison for us, returning 0 (match), 1, (mismatch), or 127 (not
found).

For a measureable benefit, I tested this on a fairly simple package,
perl-term-readkey, and counted the number of clone(2) syscalls to try
and isolate those generated by makepkg itself, rather than the user
defined functions. Results as shown below:

  336 before
  180 after

So, roughly a 50% reduction, which makes sense given that a single
check_option() call could be up to 3 subprocesses in total.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-29 20:26:27 -05:00
..
library scripts/library: remove parse_options 2012-04-24 08:38:36 -05:00
po scripts/library: remove parse_options 2012-04-24 08:38:36 -05:00
.gitignore Move some .gitignore entries 2011-07-18 10:28:19 -05:00
Makefile.am scripts/library: remove parse_options 2012-04-24 08:38:36 -05:00
makepkg.sh.in makepkg: remove subshelling from check_option and friends 2012-04-29 20:26:27 -05:00
pacman-db-upgrade.sh.in Merge branch 'maint' 2012-01-30 22:00:26 -06:00
pacman-key.sh.in pacman-key: lookup keys before receiving 2012-04-24 08:46:13 -05:00
pacman-optimize.sh.in pacman-optimize: standardize on openssl usage, only touch local/ 2012-03-08 17:26:23 -06:00
pkgdelta.sh.in Merge branch 'maint' 2012-04-24 08:44:11 -05:00
rankmirrors.sh.in rankmirrors: properly sort resulting times 2011-09-06 08:44:34 -05:00
repo-add.sh.in Merge branch 'maint' 2012-04-24 08:44:11 -05:00