pkg_* slow?

Alfred Perlstein alfred at
Sun Mar 27 11:18:15 PST 2005

* Parv <parv at> [050327 08:59] wrote:
> in message <20050327125905.GI60345 at>, 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

>   - Parv
> -- 

- Alfred Perlstein
- Research Engineering Development Inc.
- email: bright at cell: 408-480-4684

More information about the freebsd-ports mailing list