Subject: sh reads byte by byte
To: None <tech-userlevel@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-userlevel
Date: 01/20/2007 17:01:08
Hi,
while trying to see how to speedup audit-packages as used by the bulk builds,
I noticed (using ktrace) that something like this:
#!/bin/sh

while read a b c; do
echo $a $b $c
done < /tmp/file

will read /tmp/file byte by byte. With the current pkg-vulnerabilities
this makes 221909 syscalls. Would there be a way to have it read the
file in a more efficient way (rewriting it in another language is not an
option for now) ?

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--