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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8173 invoked from network); 13 Nov 2022 04:31:01 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Nov 2022 04:31:01 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1668313861; b=XDS9lYvoL9ct1zYu+3B/wHrm9g7ZnyWhqV/MtM2n+PRk0/LwbCDwd1olheJKwsAfTiuYYGCuo+ qsD9IrkBUJIcvRznd3G0uVYtVVF9ZWbABwiCSqwXqKKUGeB6kqOaIn/h70jpHG0wOQKjkyODWB 5xmGaXP0MQOjdOOyQ4vlcr8NZmoxc9BQpdHKOBlyGFVEW5KS5fj61OmRpKvT2BwSX4O7TD/uT9 3pT3BHDn007xD64O6iiRreXyQFMJI4xwA56DsPgQZgOpqABclj8fNddochYGTa1WbdWtt9aAvy B/hmGYmczXsLQhrin1/zr33HQfexWmY60s3soYQeShxSmg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1668313861; bh=1b9rzoZdZrBqc8PqHsw2irmpX7NWPZTVWP2ppu/3gPg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=aFIH6uZfXuUzZs06pWLdiI3kT7KyP7fLeNVzQlQudzJDzWo7WDSZYIzBfb45zK9a3nljb7q0Jk SVN/vLfYDQ7VUE8SDIRlV0Loxvr5s2qvjTYdrgP6z1tiU/JYmwrD2K3lcbPw+QgTnVTIYsqYk+ 0IPp6j0XIvQgzDFTqS5ym2GPuCzYGiuT0z9jrnihOKzPKUaeHgN13bc5M0UpjqpDdsk2QoE0LQ fTCoco6S2UGvtxCedAN4nYU+UyHGzsX8JYGMv+YEeQizVVYncjGNBPoUZboSrEdftq/oZtjQ+t +0Rmc3tPTyOb9qjOLJCJK7EavtNDLEoQisdprUfAxl+vvA==; 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-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=LRDBU8JdKc1nN0cd1aOLDEIF8wxs/B8V6RN/ruZ1Y5k=; b=oQuSfBUHIW7icqm9d3TOAxqUQj LOTD5NmHUQMB0THOrgki7Sg6hCf/LEajakSbyyjU/5jDFjHJcHp4bOlvCEzTTyZudQ4wrPNI4I1cX hI262XQ04yDWCPYVbdjmVNPXG4su2T4h4bsnPVGsQHuITf3lG8mpeoNRbHqbM6u/QpbtvnzjaJ1mO 68bdfwyNNgUacfNgb+dPf7v5t0FreQk3F91pX14NHsjsNQY7HjhM755kyCGoc16faWY6Ay8PF/Gca 1E0ojdogeik9+W74uD0cOmKiHopht1M9ePkc39tl26F1BbHMB8cry/L19qBrvV7/EfmxfG4SLQle/ Hmu+YH3A==; Received: by zero.zsh.org with local id 1ou4e5-000Fn1-5K; Sun, 13 Nov 2022 04:31:01 +0000 Authentication-Results: zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out5-smtp.messagingengine.com ([66.111.4.29]:58267) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1ou4do-000FRB-2u; Sun, 13 Nov 2022 04:30:46 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D341A5C00AD; Sat, 12 Nov 2022 23:30:42 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 12 Nov 2022 23:30:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1668313842; x=1668400242; bh=LRDBU8JdKc 1nN0cd1aOLDEIF8wxs/B8V6RN/ruZ1Y5k=; b=QF7c3ej188Wh6rsJRLGw7YgkC1 9Xp4rPAoDqntm0pfKq3dYWb8T0aPy+1dKoFhK7XHwPJjxitfRavXGikLcxZmxDSD QBlh3/OeKd1s5BmGy/gJ9hjTNhPCoOAG3xZHLslL60aFbjo4+S5rymo0irQqbtCP IRPj1D1rCL2c3vp/AoS23Kg1l8sETtkMkbNGLBOliHCUc71WRBCVorqG3D3viONK j/+4hib8ywy5sXx/B5ysVdaQk61nhf7yl3/gjpmfXeAAE2sO2rfj4BpG16aMrDbB QMab5LrLnC9FeAj4XzX6gIDZrgrewKxMdDQIoay6aynzb0dLCRvQre2po/yw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1668313842; x= 1668400242; bh=LRDBU8JdKc1nN0cd1aOLDEIF8wxs/B8V6RN/ruZ1Y5k=; b=t YKTQ3u3EaBPa1OkG0TSyz7MRlrsVlnpH2rH0B0QpKk3VlTVq7mbTvq6u/xY5j24F qlwgv9gxhHjPu5iHH/TyQk6DcqcaWKD0qDTuOE4FW6txaphUBYVHvAeMfRm36Pi/ aXx8N6zTNZfXwlXfMDMA27KzL1OjCcjKcupWxvyhuM7ix7JY+rowus9/TkTIGvyl t803A+wkDt/j0JSimfR8fxxMQhVzqjAcVAIxrwMpNt+DrVEdxVGjRNA7Inqm6mA2 c+yuo76H6mRzjrLJjKhZe5hI0oY6kqj4ilhREp+zH6oWnLFmzQrPCEypshn1u7Bc hiLk++k+EVLkLewqMNnTQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrfeelgdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtugfgjggfsehtkedttddtreejnecuhfhrohhmpeffrghn ihgvlhcuufhhrghhrghfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpeehtdefudelteejueefjeelgedvtedvtdehhfffjefggfeu heetheduueekuefhheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Feedback-ID: i425e4195:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 12 Nov 2022 23:30:42 -0500 (EST) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1000) id 4N8zyS3PmfzDY; Sun, 13 Nov 2022 04:30:40 +0000 (UTC) Date: Sun, 13 Nov 2022 04:30:40 +0000 From: Daniel Shahaf To: Peter Grayson Cc: zsh-workers@zsh.org Subject: Re: [PATCH] Remove StGit patch detection from vcs_info Message-ID: <20221113043040.GG27622@tarpaulin.shahaf.local2> References: <20221101030429.38029-1-pete@jpgrayson.net> <20221111114928.GF27622@tarpaulin.shahaf.local2> <603fd1b9-1b11-4729-99cb-19e1c4ef8b37@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <603fd1b9-1b11-4729-99cb-19e1c4ef8b37@app.fastmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 50947 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: Peter Grayson wrote on Sat, Nov 12, 2022 at 09:46:02 -0500: > On Fri, Nov 11, 2022, at 6:49 AM, Daniel Shahaf wrote: > > [re #2]: It sounds like StGit 2.x support can be implemented at the cost > > of one fork(2) for those who don't use StGit and under a microsecond for > > those who do. That doesn't sound like a deal breaker at all. > > Running `stg series` with StGit 2.0 takes about 12ms in my environment. > StGit 1.5 it is about 32ms. Not a microsecond, but perhaps acceptable > nonetheless. > To be clear, are these figures the duration of the «stg series --noprefix --applied» invocation? What's the impact on people who don't have stg(1) installed, or who have stg(1) installed but are currently in a worktree that doesn't use StGit? I.e., are those figures immediately after `git init`, or in a worktree that has a StGit patch stack, or? In general, 32ms for everyone might be too much (what if another third-party tool wanted to do its own elif branch that also spent 32ms for everyone? That'd be 64ms in total and counting…). However, if the 32ms would only be seen by users of an EOL'd stg(1), we can relax the threshold a bit. On the other hand, if it's 32ms just in cases where stg(1) is used… well, there doesn't seem to be much we /can/ do there. Perhaps hide some or all of the work behind an opt-in switch. (For instance, the default settings show only the topmost applied patch, so if it's possible to tell stg(1) not to emit any other patches, that might help the code finish more quickly.) >From the "Is your computer plugged in?" department: Is that 32ms figure on hot disk cache with .pyc files already having been generated? Cheers, Daniel > > > Cheers, > > > > Daniel > > > >> Signed-off-by: Peter Grayson > >> --- > >> Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 11 ++--------- > >> 1 file changed, 2 insertions(+), 9 deletions(-) > >> > >> diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git > >> index e45eebc8e..a3f4dbdf0 100644 > >> --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git > >> +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git > >> @@ -184,15 +184,8 @@ fi > >> VCS_INFO_adjust > >> VCS_INFO_git_getaction ${gitdir} > >> > >> -local patchdir=${gitdir}/patches/${gitbranch} > >> -if [[ -d $patchdir ]] && [[ -f $patchdir/applied ]] \ > >> - && [[ -f $patchdir/unapplied ]] > >> -then > >> - # stgit > >> - git_patches_applied=(${(f)"$(< "${patchdir}/applied")"}) > >> - git_patches_unapplied=(${(f)"$(< "${patchdir}/unapplied")"}) > >> - VCS_INFO_git_handle_patches > >> -elif [[ -d "${gitdir}/rebase-merge" ]]; then > >> +local patchdir > >> +if [[ -d "${gitdir}/rebase-merge" ]]; then > >> # 'git rebase -i' > >> patchdir="${gitdir}/rebase-merge" > >> local p > >> -- > >> 2.38.1 > >> > >> >