freebsd-update's install_verify routine excessive stating

Doug Barton dougb at FreeBSD.org
Fri Jan 23 12:36:56 PST 2009


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


More information about the freebsd-hackers mailing list