[pacman-dev] pacman -R speed-up (empty cache)

Nagy Gabor ngaba at bibl.u-szeged.hu
Sat Jul 5 10:42:43 EDT 2008


Around this -S reworking, I looked into "-R foo" code, and I noticed
that we search for foo group, THEN literal... This forces pacman to
read all desc files. Wow. pacman -R group is not a common task...
You may say, that I'm cheating, because we will need to check
dependencies which loads the localdb. But this task requires depends
files only.

I temporarily disabled this group removal stuff (pacman.static.new)
Let's test (in both case zip is installed):
# echo 3 > /proc/sys/vm/drop_caches && time pacman.static.new -R zip
real	0m7.697s
user	0m0.056s
sys	0m0.091s
# echo 3 > /proc/sys/vm/drop_caches && time pacman.static.old -R zip
real	0m11.822s
user	0m0.075s
sys	0m0.126s

Check what would happen, if -R wouldn't deal with groups at all (my
preferred -Rg group way; xyz is not installed):
# echo 3 > /proc/sys/vm/drop_caches && time pacman.static.new -R xyz
real	0m1.130s
user	0m0.009s
sys	0m0.011s
# echo 3 > /proc/sys/vm/drop_caches && time pacman.static.old -R xyz
real	0m7.275s
user	0m0.051s
sys	0m0.081s

More information about the pacman-dev mailing list