From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27935 invoked from network); 27 Apr 2022 14:11:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Apr 2022 14:11:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1651068701; b=TlwgnWmJadN5VDVqWZ48nGpVcjDAAYIiXtRol42rZsSKps5WOk32cYV1RIWBtXn/8yir93aS5N bcFM6JQvzM7/LUkkxAyGh1ILacmFsF0yfUDH8bFVRSaBWuh/6RXhduhey7dahvIyGwjo5tpCXu 79e1Ns+p+mGLciuU5pnGgoMSVdNzbO/0zN8uphXUwDsc6o5xktg7iUY9wG07mQNMVvE6dXvNk/ vhTy3dNGF3SArF2oWoYXgCjJ0Po7oC3ITcjppWi/l845nqzZOnyqOPNu75j3xkfqmxKIwXeD/D VutJbTwwds/C+3rIWaYQ+Biy2NDFFQBU3eiq5J0+xzB5pQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay10.mail.gandi.net) smtp.remote-ip=217.70.178.230; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1651068701; bh=zeak0SYmR99QqpbGV5E51/Bx1rqgnPUijw3G42fb8WM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=iARq7QWHvV4Cggj1u8k6vTBUMhRbBZDoUBdE8UdTIXq4qSyp/xkNHG0xvAfcnSS8g76HOemFat 8h447WXAoC0MQDYkwnI+niD4y6YgWgvcrmAoRYHJdTWWz/uk8ebdQdDf8l/cZz0tgmDVjtrmNS iJe0pYMKMmWb5NGiD9fqR4+4/qTFMYL9fn266+VHjS8Hh/zp71VnQnXhBs6s68DOQymQT92A7g oye0a3KKIFmUzPmxBm84fcTxa/4u9xYDvesgSAfMKmNNrh6nIMW9Yzz3shYKOM4dz7XX93oI7J FhLDmBjumeq5E35s9hiFt0W0I8UGyglycbbNV3lt6wFBog==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Du8S0VAwf6caghRCsTKx2WFGU7Wpuv2+cxTr4allhek=; b=RrpnU/eFfYdV2pG+JZKLFTdSr5 Vl9F6JqKuwQPRol2brMJULv7b+u75fg3iix2DKrQHw2XSMz7NIowiwKqK/jOJG/zzgyM86ZWP750Z zTtXqRgD3ujcbTfKDvdOnGwhcaiPRwLAeaxnsPfNaf/dBALkLWdifVyVhfso9r9dQnhw4RKzs3CmC CPtrdSkJLtMqNMGOW9NW3QAFgXQihYS32m+ZDyiKI9RcommOdu5aQHsj0uCAnu4FjMLh9vIiFobU1 BAgVLVSq1H42/3PN8jUusJzqIECTSkk6nu0DgmA6Kv1zFa2Wcj1k8bUUXWh4FklKcQq+SdvbFSQ/i GLDg5v9Q==; Received: from authenticated user by zero.zsh.org with local id 1njiOK-000FCs-S9; Wed, 27 Apr 2022 14:11:40 +0000 Authentication-Results: zsh.org; iprev=pass (relay10.mail.gandi.net) smtp.remote-ip=217.70.178.230; dmarc=none header.from=chazelas.org; arc=none Received: from relay10.mail.gandi.net ([217.70.178.230]:40079) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1njiNz-000EsN-L1; Wed, 27 Apr 2022 14:11:20 +0000 Received: (Authenticated sender: stephane@chazelas.org) by mail.gandi.net (Postfix) with ESMTPSA id 4913A240002; Wed, 27 Apr 2022 14:11:17 +0000 (UTC) Date: Wed, 27 Apr 2022 15:11:17 +0100 From: Stephane Chazelas To: Peter Stephenson Cc: Zsh hackers list Subject: Re: ZSH performance regression in 5.8.1.2-test Message-ID: <20220427141117.6cn4ca72kexv622s@chazelas.org> Mail-Followup-To: Peter Stephenson , Zsh hackers list References: <20220425192036.p6awbyro2a2lp7bq@chazelas.org> <1592299421.100566.1650961915601@mail2.virginmedia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1592299421.100566.1650961915601@mail2.virginmedia.com> X-Seq: 50117 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: 2022-04-26 09:31:55 +0100, Peter Stephenson: [...] > Not sure how much difference it makes but to avoid additional system calls > we could cache the result, invalidating it when we open a new file. (We > could even cache whether a seek unexpectedly failed, but that might be > getting too paranoid.) [...] FYI, see https://github.com/att/ast/issues/15 for the kind of issue you can find with ksh93 caching read data. IMO, if the point is make sure we leave the position within the input past the delimiter of the line we have just read, so that other things can read it if they want, then it's wrong to cache, as those other things could just as well overwrite things. It's also probably not going to get you that much of a benefit as the OS will have cached the data as well. -- Stephane