From 830e12ee2c88e586d24fad14470ae08a1071dd5f Mon Sep 17 00:00:00 2001 From: Richard Freeman Date: Mon, 29 Sep 2014 21:33:22 -0400 Subject: Process profiles first. Since each category is single-threaded, starting the longest one first minimizes idle cpu time. --- script.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/script.sh b/script.sh index f4cac38..c5d4d05 100755 --- a/script.sh +++ b/script.sh @@ -10,10 +10,12 @@ mkdir git -p # the most revs, thus start them first. f() { time { \ - find cvs-repo/gentoo-x86/ -maxdepth 1 -mindepth 1 -printf '%P\n' | \ - xargs -n1 -I{} -- du -cs "cvs-repo/gentoo-x86/{}" | grep -v 'total$' | \ - sort -gr | awk '{print $2;}' | xargs -n1 basename | \ - xargs -n1 -P${proc_count} -I{} ./process_directory.sh "{}" $1 + ( \ + echo "profiles" ; \ + find cvs-repo/gentoo-x86/ -maxdepth 1 -mindepth 1 -printf '%P\n' | \ + xargs -n1 -I{} -- du -cs "cvs-repo/gentoo-x86/{}" | grep -v 'total$' | \ + sort -gr | awk '{print $2;}' | xargs -n1 basename | grep -v profiles \ + ) | xargs -n1 -P${proc_count} -I{} ./process_directory.sh "{}" $1 } } fast=false -- cgit v1.2.3