summaryrefslogtreecommitdiffstats
path: root/m4/lib-ld.m4
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-04-25 05:36:08 +0200
committerDan McGee <dan@archlinux.org>2012-04-30 03:26:27 +0200
commit9dd42dc0daab510a4e68118d89b5543936d2074f (patch)
tree564abe3ab82dadb55e8436c3bf2b7db5db584816 /m4/lib-ld.m4
parent8a9c666a8c0f46739724e2032cedb451121c4594 (diff)
downloadpacman-9dd42dc0daab510a4e68118d89b5543936d2074f.tar.gz
pacman-9dd42dc0daab510a4e68118d89b5543936d2074f.tar.xz
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>
Diffstat (limited to 'm4/lib-ld.m4')
0 files changed, 0 insertions, 0 deletions