Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] readhistfile: avoid thousands of lseek(2) syscalls via ftell()
- X-seq: zsh-workers 45399
- From: Michael Stapelberg <michael+zsh@xxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH] readhistfile: avoid thousands of lseek(2) syscalls via ftell()
- Date: Sat, 8 Feb 2020 08:47:35 +0100
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- In-reply-to: <CAH+w=7ZhM50KBo4MHoqwVsRZfHVqMRTc-C=va1tjrhWGs0A5GA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CANnVG6=LfCpg7SQyiGreLzDLKi2Za0pUDR3cCzV6T6cquUr1GA@mail.gmail.com> <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@xxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Feb 6, 2020 at 11:48 PM Michael Stapelberg
> <michael+zsh@xxxxxxxxxxxxx> 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().
Messages sorted by:
Reverse Date,
Date,
Thread,
Author