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


Groups > gnu.bash.bug > #16434

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

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From "Jason A. Donenfeld" <Jason@zx2c4.com>
Newsgroups gnu.bash.bug
Subject Re: [PATCH 5.1] zread: read files in 4k chunks
Date Mon, 22 Jun 2020 14:17:41 -0600
Lines 17
Approved bug-bash@gnu.org
Message-ID <mailman.288.1592857090.2574.bug-bash@gnu.org> (permalink)
References <20200622055328.155106-1-Jason@zx2c4.com> <3cac1f66-697d-396d-3dc8-fc5b621638a4@case.edu> <271ebec9-fe1f-7823-a236-2e734657a279@iki.fi> <CAHmME9oLN4OiPnthUi1rdRhwkSPchGcyYRdpEyXz4ciU_cBg0Q@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1592857090 20973 209.51.188.17 (22 Jun 2020 20:18:10 GMT)
X-Complaints-To action@cs.stanford.edu
Cc Chester Ramey <chet.ramey@case.edu>, bug-bash@gnu.org
To Ilkka Virta <itvirta@iki.fi>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=O9RK+EhrUSjnJjGUaS1LoO6PZEY=; b=MHof+q F0MZ8lx3dPvWUHW7ZiZ4/GOVPYrHbYJvFzwqOl4dPdTvxjaeyTUnmVLDZ3efv+xt r8MmafCqGHq9ZXrERcDaZUXdV4s1aTMlbJsmbFG7GM9T107qlpxpmegK/jAVv3As GeAmGkoiXeqWKzUd90+BS1wEhm3k5AhfKMYgCiwmrBzbm4kbfn+97zGALJA6mMN8 VIeuQ/4OpCoyZRN9KVTRT/xm9uzE0D15jzt1Ig0zPEDWJhYk7MojczaNIYUKFDYg /GCem7M2vU8NBpnrrBFMV+RLBz5R7NSd19L+yqdD8K3/cOgVFwqbW9E3yTTJszq0 4M3OcD6tuLQLcuWA==
X-Gm-Message-State AOAM530WDiSWHBOWrrT6SSfH/yULs7J3Fo8k+lDPHvR3c8PHiNXFn0b0 GkGwZUreI8y3UP+ZpaWjvgGbV6D0oIIzj6OjiiM=
X-Google-Smtp-Source ABdhPJxIo5cVYoru/Apg6Gzt2KA4rDfCYh3XFsrajvIJ2bfsP2wueLxFm3ydnTK62ZtLqLtDr5fpYis+coZqKVwzW1c=
X-Received by 2002:a17:906:e247:: with SMTP id gq7mr17053724ejb.107.1592857073679; Mon, 22 Jun 2020 13:17:53 -0700 (PDT)
In-Reply-To <271ebec9-fe1f-7823-a236-2e734657a279@iki.fi>
X-Gmail-Original-Message-ID <CAHmME9oLN4OiPnthUi1rdRhwkSPchGcyYRdpEyXz4ciU_cBg0Q@mail.gmail.com>
Received-SPF pass client-ip=192.95.5.64; envelope-from=Jason@zx2c4.com; helo=mail.zx2c4.com
X-detected-operating-system by eggs.gnu.org: First seen = 2020/06/22 14:50:15
X-ACL-Warn Detected OS = Linux 3.11 and newer
X-Spam_score_int -20
X-Spam_score -2.1
X-Spam_bar --
X-Spam_report (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action no action
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAHmME9oLN4OiPnthUi1rdRhwkSPchGcyYRdpEyXz4ciU_cBg0Q@mail.gmail.com>
X-Mailman-Original-References <20200622055328.155106-1-Jason@zx2c4.com> <3cac1f66-697d-396d-3dc8-fc5b621638a4@case.edu> <271ebec9-fe1f-7823-a236-2e734657a279@iki.fi>
Xref csiph.com gnu.bash.bug:16434

Show key headers only | View raw


On Mon, Jun 22, 2020 at 2:16 PM Ilkka Virta <itvirta@iki.fi> wrote:
>
> 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.

Plus most other shells people use...

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: [PATCH 5.1] zread: read files in 4k chunks "Jason A. Donenfeld" <Jason@zx2c4.com> - 2020-06-22 14:17 -0600

csiph-web