On Fri, Sep 4, 2009 at 1:09 AM, Allan McRae<allan@archlinux.org> wrote:
Xavier wrote:
I submitted a similar patch 1 year and a half ago, but it was never accepted : http://www.mail-archive.com/pacman-dev@archlinux.org/msg00109.html
So I am afraid you are stuck with yaourt / pacsearch / any other pacman wrapper to get that feature.
Well... this is nothing if not persistent given Laslo had a bug report closed as "Won't Implement" for this feature request...
So lets take a step back and see why this feature was dismissed. As far as I can tell, it was rejected because it is slower as we need to parse the local db as well as the sync db - of course only applies before the local db is cached.
I actually had Xavier's patch bookmarked because I was going to revisit this idea with this awesome suggestion.... How about adding a configuration option called "SearchLocal" or something that directs whether this is enabled.
I did some more testing and the performance differences are pretty insignificant. For the -Sl operating, without fs cache, it is 2.2s vs 2.6s with fs cache, I get the same result than before : 0.1s vs 0.2s but who is going to notice that ? :) besides, this should only be done for the non-quiet output, so the quiet output should remain the same. In the case of -Sl, we are already looking at 4300 dir for the sync databases. Considering local db just add a few hundreds more. In the case of -Ss (Laszlo patch), the difference is even smaller, because we already have to look at 4300 dir + 4300 desc files! Considering local database only add a few hundred directories to that. If we have a performance problem, I think it's already here, and it's not going to change much with that patch ("pacman -Ss" after dropping fs caches takes ~10 seconds in both cases here :) )