"make check" times

DJ Delorie dj@redhat.com
Fri Jul 19 22:11:00 GMT 2019


While digging for some low-hanging fruit in "make" times, I did this:

diff --git a/scripts/merge-test-results.sh b/scripts/merge-test-results.sh
index 919bbae253..7088ef6996 100755
--- a/scripts/merge-test-results.sh
+++ b/scripts/merge-test-results.sh
@@ -35,7 +35,11 @@ case $type in
     subdir=${subdir:+$subdir/}
     for t in "$@"; do
       if [ -s "$objpfx$t.test-result" ]; then
-	head -n1 "$objpfx$t.test-result"
+	  #head -n1 "$objpfx$t.test-result"
+	  exec 6<"$objpfx$t.test-result"
+	  read line <&6
+	  echo $line
+	  exec 6<&-
       else
 	echo "UNRESOLVED: $subdir$t"
       fi

That one instance of "head" is called over 6000 times per "make
check", and as it's the only non-builtin in that script, it adds about
11 seconds of overhead compared to just reading that one line with
builtins.

My question here is: how much of a time savings is worth the
complexity of said savings?



More information about the Libc-alpha mailing list