From owner-freebsd-ports@FreeBSD.ORG Fri Mar 28 08:23:13 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 713CA1065670; Fri, 28 Mar 2008 08:23:13 +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 10FBD8FC32; Fri, 28 Mar 2008 08:23:12 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id E926F677CAE; Fri, 28 Mar 2008 09:22:59 +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 5QyQisOn8DpW; Fri, 28 Mar 2008 09:22:42 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id A2B97677CA9; Fri, 28 Mar 2008 09:22:42 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m2S8Mf6K048507; Fri, 28 Mar 2008 09:22:41 +0100 (CET) (envelope-from rdivacky) Date: Fri, 28 Mar 2008 09:22:41 +0100 From: Roman Divacky To: Doug Barton Message-ID: <20080328082241.GA48417@freebsd.org> References: <1206548309.78560.69.camel@pav.hide.vol.cz> <20080326201416.GA34807@freebsd.org> <47EC5589.7070207@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47EC5589.7070207@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: soralx@cydem.org, Pav Lucistnik , 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: Fri, 28 Mar 2008 08:23:13 -0000 On Thu, Mar 27, 2008 at 07:18:49PM -0700, Doug Barton wrote: > Roman Divacky wrote: > >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. > >> > >>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! > > A) this is massively cool stuff, thanks for taking this on. :) > B) you should probably do two versions of the patch, one with > style(9)-only changes, and one without. The former makes it much easier > to review the actual changes, and would speed your path to getting it in > the tree. there are 3 style-only changes in the patch.. 3 lines.. I didnt consider to make two separate patches for testing/review :) I'll do it if you insist.... thnx! roman