[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#248037: package-versions is extremly slow

Martin Michlmayr wrote:
> When I install d-i on something which is probasbly not the most modern
> hardware, but still a usable system, the "Gathering information for
> installation report" step takes ages.  I thought it is discover being
> run, but I just found out it's package-versions... it takes about 50
> seconds on this system... changing the script to use:

This also runs during prebaseconfig, and is the slowest part of the
prebaseconfig run, very apparent in vmware.

> grep "^\(Package\|Version\):" /var/lib/dpkg/status | \
> (
> ...
> )
> bring it down to about 10 seconds.
> An even faster variant is:
> grep "^\(Package\|Version\):" /var/lib/dpkg/status | sed -e 's/^[^:]+: //' | \
> (
>     while read package ; do
>         read version
>         echo "$package $version"
> )
> However, this won't work on a normal system because
> /var/lib/dpkg/status may contain information about "Package:", but
> not "Version:".  However, I think on d-i we always have Package +
> Version because nothing is being removed.

It's possible that lowmem support will involve removing packages at some

> In any case, package-versions is definitely a case where optimization
> would help.

Why arn't you committing this? :-)

see shy jo

Attachment: signature.asc
Description: Digital signature

Reply to: