betelgeuse@pena ~/checkouts/gentoolkit/trunk/src/revdep-rebuild $ time echo "$(echo /opt/ut2004/System/ut2004-bin | sed 's/^/obj /' | (cd /var/db/pkg; grep -l -f - */*/CONTENTS) | sed s:/CONTENTS:: )" games-fps/ut2004-3369-r4 games-fps/ut2004-data-3186-r2 real 0m2.735s user 0m2.366s sys 0m0.062s betelgeuse@pena ~/checkouts/gentoolkit/trunk/src/revdep-rebuild $ time qfile -q -v -C /opt/ut2004/System/ut2004-bin games-fps/ut2004-data-3186-r2 games-fps/ut2004-3369-r4 real 0m0.462s user 0m0.346s sys 0m0.031s
Created attachment 83613 [details, diff] patch against svn trunk to use qfile instead of internal hack
typo in the patch... should be "-C" instead of "-c" as argument to qlist
Created attachment 83614 [details, diff] new patch Plah typoed in my patch
-bash-3.1$ time echo "$(echo /opt/ut2004/System/ut2004-bin | sed 's/^/obj /' | (cd /var/db/pkg; grep -l -f - */*/CONTENTS) | sed s:/CONTENTS:: )" real 0m0.757s user 0m0.709s sys 0m0.052s -bash-3.1$ export LC_ALL=C -bash-3.1$ time echo "$(echo /opt/ut2004/System/ut2004-bin | sed 's/^/obj /' | (cd /var/db/pkg; grep -l -f - */*/CONTENTS) | sed s:/CONTENTS:: )" real 0m0.073s user 0m0.028s sys 0m0.071s -bash-3.1$ time qfile -q -v -C /opt/ut2004/System/ut2004-bin real 0m0.140s user 0m0.060s sys 0m0.079s This may not be a good idea; it's caused by bug #93443 AFAICT, and "solving" it with LC_ALL=C is faster here and introduces no new dependencies.
your tests are invalid as i'm betting most of the initial slowness is from I/O lag loading up the CONTENTS
> your tests are invalid as i'm betting most of the initial slowness is from I/O > lag loading up the CONTENTS If that's in reply to my comment, no, not at all. I had already repeated the commands to be sure before commenting.
that was a reply to everyone
At this point in time, I am not adding portage-utils as a dependency to gentoolkit. However, I have added runtime detection to the revdep-rebuild script and will utilize qfile instead of the internal hack if portage-utils are installed. Thanks for the bug report as working on this exposed a bug in the internal hack method that is now fixed as well.
Released in gentoolkit-0.2.2