ports/63222: [patch] Remove useless use of cat 5/5
Ulrich Spoerlein
q at uni.de
Mon Feb 23 15:50:22 UTC 2004
The following reply was made to PR ports/63222; it has been noted by GNATS.
From: Ulrich Spoerlein <q at uni.de>
To: Michael Nottebrock <michaelnottebrock at gmx.net>
Cc:
Subject: Re: ports/63222: [patch] Remove useless use of cat 5/5
Date: Mon, 23 Feb 2004 16:46:01 +0100
On Sun, 22.02.2004 at 15:38:18 +0100, Michael Nottebrock wrote:
> Impressive waste of time, way to go.
Just making sure, new porters don't see bad examples, so they don't
repeat them.
Ideally I would place some default %%foo%% expansions into bsd.port.mk,
that way you could have the substituted pkg-message in the package by
default. But I'm pretty sure people are against this.=20
> > =A0post-install:
> > =A0=A0=A0=A0=A0=A0=A0=A0@ ${MKDIR} ${PREFIX}/share/postgresql ;\
> > -=A0=A0=A0=A0=A0=A0=A0${CAT} ${FILESDIR}/post-install-notes ${PKGMESSAG=
E} |\
> > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0${SED} "s|/usr/local|${PR=
EFIX}|g" |\
> > +=A0=A0=A0=A0=A0=A0=A0${SED} "s|/usr/local|${PREFIX}|g" ${FILESDIR}/pos=
t-install-notes \
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0${PKGMESSAGE} |\
> > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0tee ${PREFIX}/share/pos=
tgresql/post-install-notes
>=20
> I'd bet that "fix" is actually slower than the original.
At least on my system, you lose this bet:
% ll gst.patch pam.list
-rw-r--r-- 1 q wheel 1196 Feb 8 21:41 gst.patch
-rw-r--r-- 1 q wheel 5521 Feb 17 13:37 pam.list
% time (sed s/foo/bar/ gst.patch pam.list >/dev/null)
0.00s user 0.01s system 70% cpu 0.011 total
% time (sed s/foo/bar/ gst.patch pam.list >/dev/null)
0.01s user 0.00s system 86% cpu 0.009 total
% time (sed s/foo/bar/ gst.patch pam.list >/dev/null)
0.00s user 0.00s system 0% cpu 0.009 total
% time (sed s/foo/bar/ gst.patch pam.list >/dev/null)
0.01s user 0.00s system 97% cpu 0.008 total
% time (sed s/foo/bar/ gst.patch pam.list >/dev/null)
0.00s user 0.01s system 357% cpu 0.002 total
^^^
wtf?
% time (cat gst.patch pam.list|sed s/foo/bar/ >/dev/null)
0.00s user 0.01s system 49% cpu 0.016 total
% time (cat gst.patch pam.list|sed s/foo/bar/ >/dev/null)
0.00s user 0.01s system 47% cpu 0.016 total
% time (cat gst.patch pam.list|sed s/foo/bar/ >/dev/null)
0.00s user 0.01s system 49% cpu 0.016 total
% time (cat gst.patch pam.list|sed s/foo/bar/ >/dev/null)
0.00s user 0.01s system 53% cpu 0.015 total
% time (cat gst.patch pam.list|sed s/foo/bar/ >/dev/null)
0.00s user 0.01s system 56% cpu 0.014 total
^^
CPU usage is lower on overall, which indicates increased
latency due to I/O overhead(??).
Ulrich Sp=F6rlein
--=20
PGP Key ID: F0DB9F44 Get it while it's hot!
PGP Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
More information about the freebsd-ports-bugs
mailing list