[pacman-dev] pacman -Qs first-run performance

Karol Blazewicz karol.blazewicz at gmail.com
Thu Sep 1 13:38:32 EDT 2011


On Thu, Sep 1, 2011 at 7:33 PM, Philipp <hollunder at lavabit.com> wrote:
> Hi there,
> pacman works very well for me, with one exception: searching for
> installed packages. For me a -Ss takes about 5 seconds, a -Qs 25
> seconds. I also noticed that this seems to be true for the first search
> run only, the following ones are less than a second, no matter whether
> it's a repo or local search. But if you want to just quickly find out a
> thing, 25 seconds or so is a long time.
>
> Anyway, I had a very brief look at the code and am far from
> understanding it, but I think libalpm/db.c handles the search, the
> package names, descriptions, etc. are stored in a linked list of
> structs, the whole thing is cached in memory only and regex wizardry
> is used for the search. If that's true, the bottleneck I experience is
> the caching.
>
> 5 seconds for -Ss is acceptable for me, but I wonder whether there's a
> reasonably easy way to improve the 25 seconds of -Qs.
>
> My knowledge of pacman internals is non-existant and my C skills are
> minimal, so I don't think I can be a lot of help with this one, but
> maybe there's something else I can be of help with instead.
>
> Best regards,
> Philipp
>
>
>

I'm getting 10s -Qs first-time searches, what harddrive are you using??


More information about the pacman-dev mailing list