Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Mar 2005 11:18:15 -0800
From:      Alfred Perlstein <alfred@freebsd.org>
To:        ports@freebsd.org
Subject:   Re: pkg_* slow?
Message-ID:  <20050327191815.GJ60345@elvis.mu.org>
In-Reply-To: <20050327165932.GA35968@holestein.holy.cow>
References:  <20050327125905.GI60345@elvis.mu.org> <20050327165932.GA35968@holestein.holy.cow>

next in thread | previous in thread | raw e-mail | index | archive | help
* Parv <parv@pair.com> [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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050327191815.GJ60345>