zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: xzfcpw@gmail.com, zsh-workers@zsh.org
Subject: Re: PATCH: readhistfile(): do not call ftell() in loop
Date: Mon, 4 May 2020 16:30:33 +0100 (BST)	[thread overview]
Message-ID: <2074263909.167631.1588606233393@mail2.virginmedia.com> (raw)
In-Reply-To: <cef5c98b3d0fb920e93d90c7cd44ce0f2da3c68d.camel@gmail.com>

> On 03 May 2020 at 10:33 xzfcpw@gmail.com wrote:
> 
> 
> Prior to this patch, readhistfile() performed one lseek() syscall (inside ftell()) per each history entry.
> This is time-consuming on large histfiles.
> 
> This patch replaces this call to ftell() with manual tracking of bytes read.

Looks fine to me --- can't think of any gotchas with file position.  I'll commit if no one else
has any comments.

pws

      reply	other threads:[~2020-05-04 15:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03  9:33 xzfcpw
2020-05-04 15:30 ` Peter Stephenson [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=2074263909.167631.1588606233393@mail2.virginmedia.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=xzfcpw@gmail.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).