Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-performance
Lists: gentoo-performance: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-performance@g.o
From: Sri Gupta <sri@...>
Subject: Re: Re: portage performance
Date: Sat, 12 Jun 2004 20:19:29 +0000
On Fri, Jun 11, 2004 at 11:02:53PM -0400, Jerry McBride wrote:
> Jesse Guardiani wrote:
> > Hello,
> > 
> > First off, sorry if this isn't the right place!
> > I didn't see anything more appropriate though, except
> > perhaps Portage-dev, but I'm not a developer.
> > 
> > I'm a FreeBSD user switching to Gentoo for my home
> > system. Linux 2.6 is a LOT more stable than any
> > FreeBSD 5.x-RELEASE kernels right now, and Linux
> > has much better support for Wine and such.
> > 
> > One of the most obvious differences between FreeBSD
> > ports and Gentoo Portage is how LONG it takes to
> > search for ports/packages with Portage.
> > 
> > I have 525 ports installed on my FreeBSD laptop right
> > now, and probably only half of that installed on the
> > Gentoo machine, but the gentoo machine crunches a lot
> > more doing a --search than the FreeBSD machine does
> > with a pkg_version -vs 'name'.
> > 
> > And forget about --searchdesc! That takes ages!
> > 
> > Is portage not hash indexed or something?
> > 
> The main problem is this.... the portage database is a file system based
> mechanism. That is to say, when you update, search or otherwise use emerge,
> the program is busy as hell leafing through thousands of files looking for
> what you want..
> "Hashed", "indexed"??? Not even close....
> Portage is begging for a decent database engine and I pray it's sql
> based....
> The other hitch is that portage is written in an interpreted language,
> Python. Python is an excellent programming language, no doubt about it, but
> performance isn't one of it's highlights. Moving portage to C would be so
> much better....

Try using a JIT-style python compiler.

#emerge psyco
#nano -w `which emerge`

Add the bit from try: to pass in like so:

import os,sys
sys.path = ["/usr/lib/portage/pym"]+sys.path

        import psyco
except ImportError:

import emergehelp,xpak,string,re,commands,time,shutil,traceback,atexit,signal,s...

use tabs for the indented bits.  you can also try the experimental 
database support (I'm using it, seems fine)

# mkdir /etc/portage
# echo 'portdbapi.auxdbmodule="portage_db_anydbm.database"' > /etc/portage/modules 
# echo 'eclass_cache.dbmodule="portage_db_anydbm.database"' >> /etc/portage/modules 

Both of these speed up portage quite a bit...

pgp0TnNsyWL28.pgp (PGP signature)
Re: Re: portage performance
-- Roman Gaufman
Re: Re: portage performance
-- Dylan Carlson
portage performance
-- Jesse Guardiani
Re: portage performance
-- Jerry McBride
Lists: gentoo-performance: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Re: portage performance
Next by thread:
Re: Re: portage performance
Previous by date:
Re: Re: portage performance
Next by date:
Re: Re: portage performance

Updated Jun 17, 2009

Summary: Archive of the gentoo-performance mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.