[Reportbug-maint] Bug#564112: Checking status of source packages with many binaries takes ~forever

Ben Hutchings ben at decadent.org.uk
Thu Jan 7 22:38:50 UTC 2010


On Thu, 2010-01-07 at 22:59 +0100, Sandro Tosi wrote:
> Hello Ben,
> thanks for your bug report.
> 
> On Thu, Jan 7, 2010 at 20:05, Ben Hutchings <ben at decadent.org.uk> wrote:
> > 8715  18:36:59 --- SIGCHLD (Child exited) @ 0 (0) ---
> > [...]
> > 9696  18:57:09 execve("/bin/sh", ["sh", "-c", "{ apt-cache show 'linux-image-2."...], [/* 46 vars */]) = 0
> 
> Holy crap, 20 minutes?! are you sure there's nothing wrong on your
> system? For example I tried to replicate here and it takes just few
> seconds:

Each invocation of apt-cache was taking about 3 seconds (with a warm
disk cache) and it was invoked once for each of ~400 binary package
names.  I think that must be a bug in APT, and indeed it runs much
faster following an 'apt-get update'

Although apt-cache should run faster, you can still expect it to take a
fair fraction of a second on slower boxes (e.g. it takes ~0.12 seconds
on agricola.debian.org which is an ARM box).  Doing this hundreds of
times is going to introduce a noticeable delay.

[...]
> I agree we can optimize a bit the code (but there's probably a reason
> is done one-by-one)

I suspect it was just the easy way to do it, and the delay will
*usually* not be noticeable.

> but that still quite weird that delay! is it
> possible that there are several packages pointing to linux-2.6 (that
> won't surprise me, you're one of the maints :) ) and so it slows damn
> down the performance? does it happen only on linux-2.6 or also on
> other packages?

The speed of apt-cache doesn't depend much on which package you select,
since it must scan all list files for potentially multiple matches.
reportbug's status checking multiplies that by the number of binary
packages and linux-2.6 is probably the worst case for that.

Ben.

-- 
Ben Hutchings
To err is human; to really foul things up requires a computer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/reportbug-maint/attachments/20100107/0f89bbf5/attachment.pgp>


More information about the Reportbug-maint mailing list