From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 31d8f911 for ; Sat, 8 Feb 2020 07:48:30 +0000 (UTC) Received: (qmail 20175 invoked by alias); 8 Feb 2020 07:48:23 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45399 Received: (qmail 29005 invoked by uid 1010); 8 Feb 2020 07:48:23 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f66.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25713. spamassassin: 3.4.2. Clear:RC:0(209.85.210.66):SA:0(-1.6/5.0):. Processed in 3.186178 secs); 08 Feb 2020 07:48:23 -0000 X-Envelope-From: michael@i3wm.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at i3wm.org does not designate permitted sender hosts) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ZQtqqDc7HygNBMOonlfda4TlQrS64Twj64gbY2ieloc=; b=ax3nEKoKxI9J/jt6elXKKTinfFm/eotC83UXHJullkG7sdMBlRjK7PEC7WaiiN+WU3 YemLENztQVMUMJtKjsEVsW95PwI+iEaUHubT7MADbfC/J8SKoSiu5VmHGZgx6gO0IhVj 2KVchpRqaHaFhA3sbBuIoh9L1zkEEaDX8S+6OX6FoNAJ3RmGy9y/jnRFJQ8s4yVs/J+U Ypfvo4itYF5981qp6wHtutePwKwFFeLGDvJvaB3m9x9QLfyIfb/0YkJBbo1Tcc3AEXUX oGQtGGaPs152yKxU8iA2pzxMQdYHszW3XAFDHA7yK6Rkl2P+K8six4d5v5n5Ge+nwkqI xaMA== X-Gm-Message-State: APjAAAUU4KtGPp6AVOVTQfXbqH4FGUdnjCbsvRkxYRioChkUvcFL+ffK wZfVXHJ9g6UhTFa3MrQaPYrPs5gwayBBe4JXRCQ1sBbIfII= X-Google-Smtp-Source: APXvYqzuKWSqrRscir7S5inTPgwqtiuIPdZcNR+zi3PQ5VvtoWpT921VPVClvoA4pdc76iRhlADvlYmzoJjKo4XVdRU= X-Received: by 2002:a9d:7757:: with SMTP id t23mr2664712otl.315.1581148066627; Fri, 07 Feb 2020 23:47:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Michael Stapelberg Date: Sat, 8 Feb 2020 08:47:35 +0100 Message-ID: Subject: Re: [PATCH] readhistfile: avoid thousands of lseek(2) syscalls via ftell() To: Bart Schaefer Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Apparently not :). I tried looking into the corresponding glibc code to see if anything changed here, but it=E2=80=99s really hard to follow wit= h all its macros. AFAICT, though, ftell is just never buffered. On Sat, Feb 8, 2020 at 6:54 AM Bart Schaefer wr= ote: > > On Thu, Feb 6, 2020 at 11:48 PM Michael Stapelberg > wrote: > > > > Before this change, zsh startup time was dominated by lseek(2) system c= alls on > > the history file > > Curious. I would have thought stdio buffering would mask most of the > need for lseek()ing by ftell().