linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@redhat.com>
To: John Stultz <john.stultz@linaro.org>, Michal Marek <mmarek@suse.cz>
Cc: kernel-team@fedoraproject.org, linux-kernel@vger.kernel.org
Subject: [PATCH] merge_config.sh: Use the first file as the initial config
Date: Wed, 1 Feb 2012 12:01:58 -0500	[thread overview]
Message-ID: <20120201170157.GA4907@zod.bos.redhat.com> (raw)

Take the first config fragment and use it verbatim as the initial config set.
This avoids running the verification loop for the first file, as nothing has
actually been merged at this point.  This significantly increases performance
for large config fragments.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
---

When experimenting with merge_config.sh on the Fedora config fragments, this
cut the execution time of a single invocation with all the config fragments
in half (from 28 seconds to 13 seconds).

 scripts/kconfig/merge_config.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index ceadf0e..23d738a 100644
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -58,12 +58,16 @@ while true; do
 	esac
 done
 
-
+INITFILE=$1
+shift;
 
 MERGE_LIST=$*
 SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
 TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
 
+echo "Using $INITFILE as base"
+cat $INITFILE > $TMP_FILE
+
 # Merge files, printing warnings on overrided values
 for MERGE_FILE in $MERGE_LIST ; do
 	echo "Merging $MERGE_FILE"
-- 
1.7.8.4


             reply	other threads:[~2012-02-01 17:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01 17:01 Josh Boyer [this message]
2012-02-02 20:14 ` [PATCH] merge_config.sh: Use the first file as the initial config John Stultz
2012-02-02 20:37   ` Darren Hart
2012-03-24 22:26 ` Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120201170157.GA4907@zod.bos.redhat.com \
    --to=jwboyer@redhat.com \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@fedoraproject.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).