dpkg -S very slow?
On of my debian machines is an aging 486/DX 100.
However, I was still surprised to see how slow dpkg -S is.
Is there any reason that dpkg -S is an order of magnitude slower than an
equivalent grep?
% time dpkg -S tamad
tama: /usr/sbin/tamad
dpkg -S tamad 51.13s user 1.02s system 99% cpu 52.310 total
% time ls /var/lib/dpkg/info/*.list | xargs grep tamad
/var/lib/dpkg/info/tama.list:/usr/sbin/tamad
ls /var/lib/dpkg/info/*.list 0.38s user 0.31s system 40% cpu 1.697 total
xargs grep tamad 0.56s user 0.80s system 48% cpu 2.790 total
Jules
/----------------+-------------------------------+---------------------\
| Jelibean aka | jules@jellybean.co.uk | 6 Evelyn Rd |
| Jules aka | jules@debian.org | Richmond, Surrey |
| Julian Bean | jmlb2@hermes.cam.ac.uk | TW9 2TF *UK* |
+----------------+-------------------------------+---------------------+
| War doesn't demonstrate who's right... just who's left. |
| When privacy is outlawed... only the outlaws have privacy. |
\----------------------------------------------------------------------/
Reply to: