From: "leon j. breedt" <ljb@neverborn.org>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] orphaned files on system?
Date: Tue, 22 Apr 2003 08:10:48 +1200 [thread overview]
Message-ID: <20030421201047.GA10697@noa.mshome.net> (raw)
In-Reply-To: <200304210344.21811.powers.161@osu.edu>
[-- Attachment #1.1: Type: text/plain, Size: 1908 bytes --]
On Mon, Apr 21, 2003 at 03:44:21AM -0400, Evan Powers wrote:
> Hmm.... Have you timed your script yet? What sorts of run times are you
> getting with that implementation?
Comparing the execution time of my implementation to yours...
Lets say mine has some issues. It runs find on the entire
filesystem tree, reads the complete output of find into memory,
and performs regex-based filtering after the fact instead of
as command-line parameters to find like you do.
To be honest, I'm ashamed that creating two sorted manifests and
comparing didn't occur to me. Your solution is annoyingly compact
and simple :)
I tweaked your script to not use qpkg -nc -l but inline Perl
parsing, and got some amazing results (roughly eight times faster on
this system).
The numbers...
Your original script:
$ time ./script-cruft.sh
./script-cruft.sh 14.56s user 0.92s system 100% cpu 15.473 total
My tweaked version:
$ time ./cruft-script-fast.sh
./script-cruft-fast.sh > fast 1.33s user 0.46s system 99% cpu 1.792 total
My Python script (oh the shame):
$ time ./gtfilelint -C gtfilelint.conf -o output.list
./gtfilelint <...> 15.86s user 7.15s system 99% cpu 23.105 total
These times are after Linux caching has kicked in. Executed
the scripts multiple times, reported only the final times. Before
caching, my script took about 160s, then 50, then 40, then 32, and
finally 23.
I guess I'll be using the tweaked version of your script from now on
(attached) :)
Interestingly, delving into the innards of epm and qpkg, revealed a
bug in their CONTENTS parsing code...They can't handle filenames with
spaces in them. They truncate the filename at the place a space occurs.
Other than that, the output generated by my tweaked version and your
original should be identical for the same set of paths to exclude.
Leon
--
in the beginning, was the code.
[-- Attachment #1.2: script-cruft-fast.sh --]
[-- Type: application/x-sh, Size: 943 bytes --]
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2003-04-21 19:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-17 11:41 [gentoo-dev] orphaned files on system? leon j. breedt
2003-04-20 14:46 ` Daniel Armyr
2003-04-21 7:44 ` Evan Powers
2003-04-21 20:10 ` leon j. breedt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030421201047.GA10697@noa.mshome.net \
--to=ljb@neverborn.org \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox