Date: Fri, 23 Jan 2009 12:37:23 -0800 From: Doug Barton <dougb@FreeBSD.org> To: Oliver Fromme <olli@lurza.secnetix.de> Cc: Yoshihiro Ota <ota@j.email.ne.jp>, freebsd-hackers@FreeBSD.org, xistence@0x58.com, cperciva@FreeBSD.org Subject: Re: freebsd-update's install_verify routine excessive stating Message-ID: <497A2A83.9010606@FreeBSD.org> In-Reply-To: <200901232006.n0NK6M1B092584@lurza.secnetix.de> References: <200901232006.n0NK6M1B092584@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Oliver Fromme wrote:
> I assume, with "this" you mean my solution to the slow
> shell loop problem (not quoted above), not Yoshihiro Ota's
> awk proposal?
I meant the solution using comm, sorry. (I forgot to mention that I
would probably use cmp here, but that's a personal preference.)
> Yes, it can. I already explained pretty much all of that
> (useless cat etc.) in my first post in this thread. Did
> you read it?
Yes, I was attempting to agree with you. :)
> My suggestion (after a small correction by
> Christoph Mallon) was to replace the cat|cut|grep|cut
> sequence with this single awk command:
>
> awk -F "|" '$2 ~ /^f/ {print $7}' "$@"
>
> For those not fluent with awk, it means this:
> - Treat "|" as field separator.
> - Search for lines where the second field matches ^f
> (i.e. it starts with an "f").
> - Print the 7th field of those matching lines.
Like I said, I haven't seen the files, but this looks good at first
blush. That said, the generation of the hash list file is just a drop
in the bucket. The real inefficiency in this function is the test -f
for 64k files, one at a time.
Doug
--
This .signature sanitized for your protection
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?497A2A83.9010606>
