[pacman-dev] [PATCH 0/2] Remove REQUIREDBY usage
Dan McGee
dpmcgee at gmail.com
Mon Nov 12 22:24:21 EST 2007
On Nov 12, 2007 8:01 PM, Dan McGee <dpmcgee at gmail.com> wrote:
> Some quick observations:
> $ time pacman -Qt > /dev/null (pacman 3, latest GIT release)
> real 0m0.084s
> user 0m0.020s
> sys 0m0.043s
>
> $ time ./src/pacman/pacman -Qt > /dev/null (with compute_requiredby switch)
> real 0m1.893s
> user 0m1.800s
> sys 0m0.037s
>
> Obviously a slowdown, but is it all that bad in the big scheme of
> things when corrupted requiredby entries no longer hurt us?
I ran valgrind --tool=callgrind on the above command to see where our
hotpoint is in the code, and it is quite clear- alpm_splitdeps takes
almost 70% of the total time. That is wildly inefficient for such a
small function, and that is after I even did a little optimization to
it. So if we are looking to focus our energy on anything, it is this
one function that needs it OR at least figuring out how we could
better implement it. Perhaps we should split all the deps upon package
loading instead? Considering I doubt their are 1.3 million dep entries
in our DB (the amount of times alpm_splitdeps is called), this would
really help if it is possible.
-Dan
More information about the pacman-dev
mailing list