On Fri, 11 Dec 2009, Nagy Gabor wrote:
-Su is even worse: We have to read all desc files in sync (to get %REPLACES%)
I changed pacman DB using the following script, and applied the attached script to pacman so that "pacman -Su" is possible only by reading "depends" files, not "desc". for d in $PACDB/sync/*/* $PACDB/local/* do sed -ne '/%REPLACES%/,/^$/p' $d/desc >> $d/depends sed -i -e '/%REPLACES%/,/^$/d' $d/desc done The timings I got for the command "pacman -Sup -b $PACDB" are the following. Before: 2m15s (cold caches) 0.98s (hot caches) After: 2m11s (cold caches) 0.78s (hot caches) Unfortunately it didn't provide such a big improvement as I expected. I can now justify this because desc files in sync/ were being read *instead* of depends, not in addition to them. So I _replaced_ the read("*/desc") with read("*/depends"), but disk seeks are still happening, even for these smaller files. I believe big differences will show when people have many upgrades pending, in which case the already cached depends will come handy. Unfortunately I only had 6 upgrades pending. But I think it's vital that not all descriptions and stuff are read during a common operation like -Su, and with the provided script (run only for local, since sync should be upgraded on the server) the transition should be smooth for end-users. What's your opinion? Dimitris