From owner-freebsd-ports@FreeBSD.ORG Mon Mar 31 14:24:44 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 711B5106566B for ; Mon, 31 Mar 2008 14:24:44 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.freebsd.org (Postfix) with ESMTP id 073C58FC15 for ; Mon, 31 Mar 2008 14:24:43 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from parthe.lpthe.jussieu.fr (parthe.lpthe.jussieu.fr [134.157.10.1]) by shiva.jussieu.fr (8.14.2/jtpda-5.4) with ESMTP id m2VEOfpd050288 for ; Mon, 31 Mar 2008 16:24:41 +0200 (CEST) X-Ids: 165 Received: from niobe.lpthe.jussieu.fr (niobe.lpthe.jussieu.fr [134.157.10.41]) by parthe.lpthe.jussieu.fr (Postfix) with ESMTP id 39A0023705C for ; Mon, 31 Mar 2008 16:24:40 +0200 (CEST) Received: by niobe.lpthe.jussieu.fr (Postfix, from userid 2005) id 1EFBF30; Mon, 31 Mar 2008 16:24:40 +0200 (CEST) Date: Mon, 31 Mar 2008 16:24:40 +0200 From: Michel Talon To: freebsd-ports@FreeBSD.org Message-ID: <20080331142440.GA95979@lpthe.jussieu.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (shiva.jussieu.fr [134.157.0.165]); Mon, 31 Mar 2008 16:24:41 +0200 (CEST) X-Virus-Scanned: ClamAV 0.92/6500/Mon Mar 31 15:32:19 2008 on shiva.jussieu.fr X-Virus-Status: Clean X-Miltered: at jchkmail.jussieu.fr with ID 47F0F429.002 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 47F0F429.002/134.157.10.1/parthe.lpthe.jussieu.fr/parthe.lpthe.jussieu.fr/ X-j-chkmail-Score: MSGID : 47F0F429.002 on jchkmail.jussieu.fr : j-chkmail score : . : R=. U=. O=. B=0.053 -> S=0.053 X-j-chkmail-Status: Ham Cc: 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: Mon, 31 Mar 2008 14:24:44 -0000 Roman Divacky wrote: > To my eye, it doesn't look like matchbyorigin() could be > re-implemented > to be faster with little effort, but could somebody have a quick look > as well? Would doing mmap() instead of scanning file line-by-line be > any faster? (though I'm not saying it's a great idea) In the python script check_pkg.py that i mentioned previously (*), i observed that implementing a mmap solution insted of working line by line produced a *great* speedup (5 times if i remember well), but perhaps this is due to python specifics. (*) http://www.lpthe.jussieu.fr/~talon/pkg_check.py -- Michel TALON