From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 18:22:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEEC9106567B for ; Fri, 9 May 2008 18:22:37 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 899878FC0C for ; Fri, 9 May 2008 18:22:37 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 750ACE506AA for ; Fri, 9 May 2008 18:22:33 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id 6363116FC2; Fri, 9 May 2008 20:21:47 +0200 (CEST) Date: Fri, 9 May 2008 20:21:47 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20080509182147.GA998@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20080509124308.GA596@britannica.bec.de> <20080509170633.GB3571@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Adding .db support to pkg_tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 18:22:37 -0000 On Fri, May 09, 2008 at 07:54:40PM +0200, Anders Nore wrote: > You are probably right, but how would you store the key's? Is storing the > key as e.g., 'portname-1.2_3+CONTENT' a good solution? I'd just use a different db file. I am not sure how much the following applies to FreeBSD as pkg_install has diverted a lot. The most expensive operations during pkg_add and pkg_info are scans for conflicts (explicit via @pkgcfl or implicit due to overlapping file lists) as they need to compare the to-be-installed package with all existing ones. After that come directory scans to resolve dependencies. Everything else is really just "open this small file and extract some data from it", where small usually means less than one block. Putting that into a database can help or not, but I don't think it is relevant. So the most important operations to support a btree of all files (implemented in NetBSD/pkgsrc) and a btree of all @pkgcfl/@pkgdb (not implemented yet). Joerg