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

Bug#917478: popularity-contest: Improve performance (4x faster)



On Thu, Dec 27, 2018 at 11:19:45PM +0100, Benoît wrote:
> Package: popularity-contest
> Version: 1.67
> Severity: minor
> Tags: patch
> 
> Dear Maintainer,
> 
> For each installed packages, popcon globs the complete list of files
> in /var/lib/dpkg/info.
> This is very slow as I noticed that popcon takes more than a minute of CPU
> time on my modest laptop, which is enough to start the fan.
> 
> I'm attaching a patch that lists only once /var/lib/dpkg/info and associates
> each .list file with a package.
> 
> I don't see any difference in /usr/sbin/popularity-contest output.
> And the CPU time goes from 1min08s to 0min14s.

Hello Benoît,

Thanks for your patch!

I tried it and it output warnings for multiarch packages which have both
a amd64.list and a i386.list like

/var/lib/dpkg/info/gcc-4.8-base:amd64.list
/var/lib/dpkg/info/gcc-4.8-base:i386.list 

I get:
Use of uninitialized value $_ in open at ./popularity-contest line 146,
<PACKAGES> line 285.

Do you understand what happen ?

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 


Reply to: