On Wed, 29 Jun 2011, Anders Kaseorg wrote:
> That patch caused an outrageous 40000% performance regression in the 
> debsums apt hook (/etc/apt/apt.conf.d/90debsums), such that now it takes 
> several minutes to install anything with apt.
> 
> Before:
> $ sudo time /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives
> 0.35user 0.02system 0:00.48elapsed 75%CPU (0avgtext+0avgdata 
> 45360maxresident)k
> 160inputs+896outputs (0major+37865minor)pagefaults 0swaps
> 
> After:
> $ sudo time /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives
> 148.48user 17.81system 2:57.33elapsed 93%CPU (0avgtext+0avgdata 
> 45904maxresident)k
> 0inputs+0outputs (0major+9347058minor)pagefaults 0swaps
> 
> Is there a way to get this information without running dpkg-query once for 
> each package?

One can run dpkg-query with multiple arguments to avoid the overhead. But
it requires some refactoring of the code I guess. I.e. find out the list
of package first, then run dpkg-query on all the packages at the same time.

BTW, debsums should really use "dpkg-query --control-path <pkg> md5sums"
to know if there's a md5sums file... and if it's lacking it should NOT
store it in the dpkg control area but outside in a debsums-specific
directory. Because you don't know how dpkg's internal files are
organized...

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to