Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16433 > unrolled thread

Re: [PATCH 5.1] zread: read files in 4k chunks

Started byIlkka Virta <itvirta@iki.fi>
First post2020-06-22 23:16 +0300
Last post2020-06-22 23:16 +0300
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 5.1] zread: read files in 4k chunks Ilkka Virta <itvirta@iki.fi> - 2020-06-22 23:16 +0300

#16433 — Re: [PATCH 5.1] zread: read files in 4k chunks

FromIlkka Virta <itvirta@iki.fi>
Date2020-06-22 23:16 +0300
SubjectRe: [PATCH 5.1] zread: read files in 4k chunks
Message-ID<mailman.287.1592857014.2574.bug-bash@gnu.org>
On 22.6. 19.35, Chet Ramey wrote:
> On 6/22/20 1:53 AM, Jason A. Donenfeld wrote:
>> Currently a static sized buffer is used for reading files. At the moment
>> it is extremely small, making parsing of large files extremely slow.
>> Increase this to 4k for improved performance.
> 
> I bumped it up to 1024 initially for testing.

It always struck me as odd that Bash used such a small read of 128 
bytes. Most of the GNU utils I've looked at on Debian use 8192, and a 
simple test program seems to indicate glibc's stdio reads 4096 bytes at 
one read() call.

-- 
Ilkka Virta / itvirta@iki.fi

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web