zsh-workers
 help / color / mirror / code / Atom feed
From: Michael Stapelberg <michael+zsh@stapelberg.ch>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: [PATCH] readhistfile: avoid thousands of lseek(2) syscalls via ftell()
Date: Sat, 8 Feb 2020 08:47:35 +0100	[thread overview]
Message-ID: <CANnVG6=kwCHyv8i2F9GesGdp7t6TsmhJx8V5KcKOXYOxvdk5yA@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7ZhM50KBo4MHoqwVsRZfHVqMRTc-C=va1tjrhWGs0A5GA@mail.gmail.com>

Apparently not :). I tried looking into the corresponding glibc code
to see if anything changed here, but it’s really hard to follow with
all its macros. AFAICT, though, ftell is just never buffered.

On Sat, Feb 8, 2020 at 6:54 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> On Thu, Feb 6, 2020 at 11:48 PM Michael Stapelberg
> <michael+zsh@stapelberg.ch> wrote:
> >
> > Before this change, zsh startup time was dominated by lseek(2) system calls on
> > the history file
>
> Curious.  I would have thought stdio buffering would mask most of the
> need for lseek()ing by ftell().

      reply	other threads:[~2020-02-08  7:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07  7:47 Michael Stapelberg
2020-02-07 11:30 ` Mikael Magnusson
2020-02-07 11:33   ` Michael Stapelberg
2021-04-10  0:54     ` Oliver Kiddle
2021-04-10 17:31       ` Bart Schaefer
2020-02-08  5:54 ` Bart Schaefer
2020-02-08  7:47   ` Michael Stapelberg [this message]

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='CANnVG6=kwCHyv8i2F9GesGdp7t6TsmhJx8V5KcKOXYOxvdk5yA@mail.gmail.com' \
    --to=michael+zsh@stapelberg.ch \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).