Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Jun 2013 12:12:13 +0200
From:      Florent Peterschmitt <florent@peterschmitt.fr>
To:        freebsd-hackers@freebsd.org
Subject:   Re: sed query
Message-ID:  <51AB1A7D.7090400@peterschmitt.fr>
In-Reply-To: <CADLo838JALaTwdSjy%2BV0JMHkbz1mD%2BezOq7a=dRzeNaSeUrDEg@mail.gmail.com>
References:  <CADLo838JALaTwdSjy%2BV0JMHkbz1mD%2BezOq7a=dRzeNaSeUrDEg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2RHRUBSRSOKLAOPJKHJDX
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Le 31/05/2013 16:01, Chris Rees a =E9crit :
> Hi all,
>=20
> I think I've discovered a strange behaviour of sed perhaps triggered
> by the length of a regex passed to it.  I noticed that a certain
> expression I passed took a very long time, and suspected the usual
> backtracking loop, so I started trimming it... and discovered this:
>=20
> [crees@pegasus]~% time sed -ne "s,^BitchX-[0-9][^|]*[\|]/usr/por,,"
> /var/db/pkg/INDEX-9
> 4.699u 0.007s 0:04.70 99.7% 40+2733k 0+0io 0pf+0w
> [crees@pegasus]~% time sed -ne "s,^BitchX-[0-9][^|]*[\|]/usr/po,,"
> /var/db/pkg/INDEX-9
> 0.042u 0.000s 0:00.04 100.0% 48+3216k 0+0io 0pf+0w
>=20
> I've looked at the code, and can't from a brief glance figure out why
> a slightly longer regex makes such a difference-- does it start to
> split it?
>=20
> Chris

Uhu, maybe a bug that should be reported ?



------enig2RHRUBSRSOKLAOPJKHJDX
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQEcBAEBAgAGBQJRqxqAAAoJEMtO2Sol0IImaWkH+wSK59E776ge1fR0yl++PTM4
mFmvZMo6VS9ixLD5D7kfag8QZaqk9G2TwHygq22LsvA6Hz7nCxZFlyZR9G/C/nBF
1JZYhA+kd71OdrsLvS/Xh88ouGaU7x8LDrqSH+2I6oq34lhjAvCmuoQSj3ySO6mF
PAtw7NSKh4FLsw0oBmbnVousnI2PgSMdkghVfX9kIx1vk8jp/eLxzJVlWTcoNZIP
zUZTWPFknXADI506QWbrT6HGsCW4kJPQY5lCndOsHHVL/BeYMEMrxIjvMivVjF/L
O9PgLGruh9RXwig0eO+NcU9tL7uD9V67wBoP+vYY847SCTocC6BNYOAbvmO39OI=
=1t5e
-----END PGP SIGNATURE-----

------enig2RHRUBSRSOKLAOPJKHJDX--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51AB1A7D.7090400>