From owner-freebsd-ports@FreeBSD.ORG Sun Mar 27 16:59:34 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1600816A4CE; Sun, 27 Mar 2005 16:59:34 +0000 (GMT) Received: from mta13.adelphia.net (mta13.mail.adelphia.net [68.168.78.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42B4D43D41; Sun, 27 Mar 2005 16:59:33 +0000 (GMT) (envelope-from parv@pair.com) Received: from default.chvlva.adelphia.net ([69.160.65.223]) by mta13.adelphia.netESMTP <20050327165932.BMKR4618.mta13.adelphia.net@default.chvlva.adelphia.net>; Sun, 27 Mar 2005 11:59:32 -0500 Received: by default.chvlva.adelphia.net (Postfix, from userid 1000) id 75EEBB522; Sun, 27 Mar 2005 11:59:33 -0500 (EST) Date: Sun, 27 Mar 2005 11:59:33 -0500 From: Parv To: Alfred Perlstein Message-ID: <20050327165932.GA35968@holestein.holy.cow> Mail-Followup-To: Alfred Perlstein , ports@freebsd.org References: <20050327125905.GI60345@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050327125905.GI60345@elvis.mu.org> cc: ports@freebsd.org Subject: Re: pkg_* slow? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 16:59:34 -0000 in message <20050327125905.GI60345@elvis.mu.org>, wrote Alfred Perlstein thusly... > > I noticed that ports are very slow lately, what I realized is that > the pkg_* tools on my machine spend a huge amount of time walking > the /var/db/pkg/* files stat(2)'ing them and doing other > operations. > > This gets really slow when one has 500+ packages installed. "pkg_info -[wRr]" is going to take its sweet time to look for the requested information. "pkg_info -s" will be slow if there are large number of files in a package. Plain "pkg_info" should be rrelatively fast if the given arguments don't specify a "larger number" of ports. One could create some sort of cache the that would (try to) minimize file accesses/searches. - Parv --