From owner-freebsd-ports@FreeBSD.ORG Wed Mar 26 20:33:21 2008 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E68F21065679 for ; Wed, 26 Mar 2008 20:33:21 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 9D2558FC20 for ; Wed, 26 Mar 2008 20:33:21 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 6CB66677521; Wed, 26 Mar 2008 21:14:35 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6zrTZbU5sM-5; Wed, 26 Mar 2008 21:14:19 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id E65EC6738F0; Wed, 26 Mar 2008 21:14:18 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m2QKEG1c034976; Wed, 26 Mar 2008 21:14:16 +0100 (CET) (envelope-from rdivacky) Date: Wed, 26 Mar 2008 21:14:16 +0100 From: Roman Divacky To: Pav Lucistnik Message-ID: <20080326201416.GA34807@freebsd.org> References: <1206548309.78560.69.camel@pav.hide.vol.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: <1206548309.78560.69.camel@pav.hide.vol.cz> User-Agent: Mutt/1.4.2.3i Cc: soralx@cydem.org, freebsd-ports@FreeBSD.org Subject: Re: [patch] pkg_delete(1) speedup X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2008 20:33:22 -0000 --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 26, 2008 at 05:18:29PM +0100, Pav Lucistnik wrote: > You might have noticed a thread on the mailing list called "ports system > woes". The submitter pointed out an inefficiency in pkg_delete routine, > that parses the whole /var/db/pkg over and over again for every > dependency of a package being removed. >=20 > Attached is a patch by rdivacky that implements the idea of looking up > all the values in a single pass over /var/db/pkg content. I hacked a slightly better patch that coveres a part of pkg_add too.. please review/test on: www.vlakno.cz/~rdivacky/pkg_tools.patch comments, benchmarks more than welcome! roman=09 --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkfqrpgACgkQLVEj6D3CBEzcEACeJNoVaABjH8qq4WlGGqr7iUIY e08AniWSosAj9Z1Z+9lyij+K+5vXbZYw =l9WQ -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM--