From: Herbert Xu <herbert@gondor.apana.org.au>
To: DASH Mailing List <dash@vger.kernel.org>
Subject: [PATCH 0/3] Improve performance when reading stdin
Date: Sun, 05 May 2024 17:24:05 +0800 [thread overview]
Message-ID: <cover.1714900988.git.herbert@gondor.apana.org.au> (raw)
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(-)
--
2.39.2
next reply other threads:[~2024-05-05 9:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-05 9:24 Herbert Xu [this message]
2024-05-05 9:24 ` [PATCH 1/3] input: Move newline loop into preadbuffer Herbert Xu
2024-05-05 9:24 ` [PATCH 2/3] input: Use lseek on stdin when possible Herbert Xu
2024-05-05 9:24 ` [PATCH 3/3] input: Use tee(2) for stdin pipe Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1714900988.git.herbert@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=dash@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).