Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128374 - Making revdep-rebuild faster by using qfile instead of internal hack
Summary: Making revdep-rebuild faster by using qfile instead of internal hack
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-04-01 05:45 UTC by Petteri Räty (RETIRED)
Modified: 2006-06-19 20:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch against svn trunk to use qfile instead of internal hack (revdep-rebuild-qfile.patch,603 bytes, patch)
2006-04-01 05:46 UTC, Petteri Räty (RETIRED)
Details | Diff
new patch (revdep-rebuild-qfile.patch,599 bytes, patch)
2006-04-01 05:53 UTC, Petteri Räty (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2006-04-01 05:45:08 UTC
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
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2006-04-01 05:46:27 UTC
Created attachment 83613 [details, diff]
patch against svn trunk to use qfile instead of internal hack
Comment 2 Patrick Borjesson 2006-04-01 05:49:18 UTC
typo in the patch... should be "-C" instead of "-c" as argument to qlist
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2006-04-01 05:53:04 UTC
Created attachment 83614 [details, diff]
new patch 

Plah typoed in my patch
Comment 4 Harald van Dijk (RETIRED) gentoo-dev 2006-04-01 08:34:47 UTC
-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.
Comment 5 SpanKY gentoo-dev 2006-04-01 12:47:02 UTC
your tests are invalid as i'm betting most of the initial slowness is from I/O lag loading up the CONTENTS
Comment 6 Harald van Dijk (RETIRED) gentoo-dev 2006-04-01 12:50:08 UTC
> 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.
Comment 7 SpanKY gentoo-dev 2006-04-01 12:55:59 UTC
that was a reply to everyone
Comment 8 Paul Varner (RETIRED) gentoo-dev 2006-05-21 10:23:03 UTC
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.
Comment 9 Paul Varner (RETIRED) gentoo-dev 2006-06-19 20:30:51 UTC
Released in gentoolkit-0.2.2