tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Improving 'bmake wrapper' speed



On Fri, Aug 22, 2014 at 02:18:42PM +0100, Jonathan Perkin wrote:
> I have a proposed patch which significantly reduces the number of
> execs we need to perform:
> 
>   http://us-east.manta.joyent.com/jperkin/public/patches/wrapper-perf.diff

These are impressive numbers.

Looking at the patch, it consists mostly of changes like these:

-              $cat << EOF
-s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g
-s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g
-s|\([$_sep]\)$1$|\1$2|g
-s|^$1\([$_sep]\)|$2\1|g
-s|^$1$|$2|g
-EOF
+                       echo "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g"
+                       echo "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g"
+                       echo "s|\([$_sep]\)$1$|\1$2|g"
+                       echo "s|^$1\([$_sep]\)|$2\1|g"
+                       echo "s|^$1$|$2|g"

The only I thing I wonder about this is if there is a quoting
difference between the two versions that might be relevant for pkgsrc,
or not.
 Thomas


Home | Main Index | Thread Index | Old Index