[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] speed up MODULES.html.sh a bit
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] speed up MODULES.html.sh a bit |
Date: |
Tue, 14 Nov 2006 21:30:54 +0100 |
User-agent: |
KMail/1.9.1 |
Hello Ralf,
> The patch below shaves a couple of minutes off of MODULES.html.sh's
> roughly 5 minutes worth of execution time. Half of that is achieved
> by not calling gnulib-tool more often than necessary, the other by
> eliminating a couple of quadratic file list handlings.
These are good tricks; thanks.
You also combined adjacent sed invocations. Which rule are you using here?
When is it safe to combine
sed -e "$expr1" | sed -e "$expr2"
into
sed -e "$expr1" -e "$expr2"
?
Also, can you please put spaces around < and > when they are used for
redirection, please? (For legibility.)
> As shown, the script will now use temporary files in the current
> directory. Should I rather rewrite to use func_tmpdir and a trap
> for cleanup, similar to what happens in gnulib-tool?
Yes, please. func_tmpdir is reliable. There's no point in having shell
scripts leave files around any more. (Soon we'll need an 'aclocal' or
'gnulib-tool' for shell functions :-)).
> Otherwise, OK to apply?
If it generates the same MODULES.html than the previous script, yes.
Bruno