From owner-freebsd-ports@FreeBSD.ORG Sun Mar 27 19:18:15 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 A5A5816A4CE for ; Sun, 27 Mar 2005 19:18:15 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7690E43D2F for ; Sun, 27 Mar 2005 19:18:15 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 5A48C5C9F2; Sun, 27 Mar 2005 11:18:15 -0800 (PST) Date: Sun, 27 Mar 2005 11:18:15 -0800 From: Alfred Perlstein To: ports@freebsd.org Message-ID: <20050327191815.GJ60345@elvis.mu.org> References: <20050327125905.GI60345@elvis.mu.org> <20050327165932.GA35968@holestein.holy.cow> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050327165932.GA35968@holestein.holy.cow> User-Agent: Mutt/1.4.2.1i 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 19:18:15 -0000 * Parv [050327 08:59] wrote: > 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. The actual problem is when pkg_delete is used to delete a package as well as when the port is "registering installation" is when it appears to walk the /var/db/pkg/ directory. The problem can be seen on my machine if you install/deinstall the deskutils/logjam port. > > > - Parv > > -- -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684