mbox series

[v3,0/3] Improve performance when reading stdin

Message ID cover.1717291846.git.herbert@gondor.apana.org.au (mailing list archive)
Headers show
Series Improve performance when reading stdin | expand

Message

Herbert Xu June 2, 2024, 1:31 a.m. UTC
v3 rebases on multibyte patch-set v5.

The performance when reading stdin has regressed after we started
reading one byte at a time.  This patch series uses lseek(2) and
tee(2) to recover performance where possible.

Herbert Xu (3):
  input: Move newline loop into preadbuffer
  input: Use lseek on stdin when possible
  input: Use tee(2) for stdin pipe

 configure.ac  |   2 +-
 src/eval.c    |   3 +
 src/init.h    |   1 +
 src/input.c   | 208 +++++++++++++++++++++++++++++++++++++++-----------
 src/input.h   |   4 +
 src/jobs.c    |   3 +
 src/mkinit.c  |   6 ++
 src/options.c |   2 +-
 src/redir.c   |  26 ++++---
 src/system.h  |   7 ++
 src/trap.c    |   1 +
 11 files changed, 205 insertions(+), 58 deletions(-)