On Mon, Nov 16, 2009 at 3:39 AM, Dan McGee <dpmcgee@gmail.com> wrote:
On Mon, Sep 7, 2009 at 4:43 PM, Xavier Chantry <shiningxc@gmail.com> wrote:
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
I like the idea of this one, but it does have a pretty big performance hit. Do we care?
I ran the following: $ valgrind --tool=callgrind ./src/pacman/.libs/lt-pacman -Ss a >/dev/null
And then looked at the results in kcachegrind. 40% of the total time was spent in print_installed() or below.
I think db_get_pkg is widely inefficient because our data structures suck. And if it's a cold run, it's much worse because of the crappy filesystem backend. Anyway I am undecided. I don't even know what I care the least about (the performance hit or this feature). A compromise would be to not have this feature enabled by default. either using a flag or an option.