[Frugalware-devel] Pacman speed improvement

VMiklos vmiklos at frugalware.org
Tue Jan 23 01:53:29 CET 2007


On Tue, Jan 23, 2007 at 12:36:49AM +0100, Nagy Gabor <ngaba at petra.hos.u-szeged.hu> wrote:
> 1. I think, that the main problem is the dbcache, which is calculated
> in most cases (e.g. this is the first step when you do a 'pacman -S
> foo' (?!)). In the current state of pacman, the whole package info is
> always loaded into the dbcache for all package, which means
> that all /var/lib/pacman/*/desc files (hundreds of files) needs to be
> read (in my computer this process takes 20 sec). I think loading desc
> for all package (in remote repo) is needless, because usually this is
> needed for the packages which we working with (except -Ss for example).
> The package name and version can be easily got from the repo
> directory (~ls), so this can be done as a dbcache initialization (this
> is fast.) To maintain the current structure of the source, I think
> that the best solution is to replace 'dbcache_entry->info' (and
> similar) with a function package_info(dbcache_entry) which checks if
> the info field is loaded to dbcache_entry already or not and loads it if
> needed and returns with it. In the 'pacman -S foo' example you need to
> read the repo directory (~ ls => fast) to initialize dbcache, search
> the package 'foo', read its dependencies (from desc) and the
> dependencies' dependencies... so you need to read the desc files only
> for packages to be installed.

we could use something like _alpm_pkg_getinfo() for such purpose. i'm
not sure if i'll have time, but in case yes then i plan to work on this

we could archieve an extremely big speedup ie. when using pacman -Si foo

udv / greetings,
VMiklos

-- 
Developer of Frugalware Linux, to make things frugal - http://frugalware.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/attachments/20070123/98988c28/attachment.bin


More information about the Frugalware-devel mailing list