From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 12:41:58 2024 Received: (at submit) by debbugs.gnu.org; 7 Nov 2024 17:41:58 +0000 Received: from localhost ([127.0.0.1]:49479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t96W5-0002nH-US for submit@debbugs.gnu.org; Thu, 07 Nov 2024 12:41:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:34932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t96W2-0002n7-6C for submit@debbugs.gnu.org; Thu, 07 Nov 2024 12:41:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t96W1-0007t5-D1 for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 12:41:54 -0500 Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t96Vz-0007wb-90 for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 12:41:53 -0500 From: Spencer Baugh To: bug-gnu-emacs@gnu.org Subject: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered Date: Thu, 07 Nov 2024 12:41:47 -0500 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1731001307; bh=YFBJsBgwQ4T17T5yuqnoE9hwEI6OSA+mL5af/Oefc8c=; h=From:To:Subject:Date; b=w7R4QHoVrTI44tChExdx9yW0Wlu39llocSLQJZ9BzadrUOycn6P/Mf/0gYwnb0fZl molvE1LyvBI4Vjva6+ToY8kMjNd1ZoPkGUzSQbHCs1+47Pf5uNx6pG0+3gnZuDYMSO GNAYrdEHV7k6fL/K6i9qSHFvwBegDiUmpHh3M/NybQD93H+MQaiT/GPZc3RoOutAGx mwgIJ04fTYAXHzh08qb7DBG5d5+WRO77LYOaq33Iz9+xB1bjWWhXZjJIDGjpcnPJ43 5hwsRf3Bcf7qotYohb8fXge8ZM3L50nkJbn154DIcY7tOgnzUwhrqHqNSbJOFMYWEi ThjJgqTIFrcLg== Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; helo=mxout5.mail.janestreet.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Tags: patch The most significant slow component of "hg status" is parsing the .hgignore file. If we pass -mardc instead of -A to hg status, hg doesn't list ignored or untracked files, so it skips parsing the .hgignore. On my large repo, this brings "hg status" from 140ms to 20ms. For vc-hg-state, the distinction doesn't matter: nothing using the output of vc-hg-state has significantly different behavior for ignored files vs unregistered files: - vc-dir-clean-files and vc-dir-recompute-file-state call vc-hg-state, but will never see an ignored file anyway since vc-dir shouldn't list ignored files for hg. - vc-next-action checks 'ignored, but it's OK to take the 'unregistered path instead; it will either fail when calling hg, or succeed. - Other users of vc-state don't differ between 'ignored and 'unregistered * lisp/vc/vc-hg.el (vc-hg-state-slow): Treat ignored files as unregistered. In GNU Emacs 29.2.50 (build 6, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2024-11-06 built on igm-qws-u22796a Repository revision: 18ed746717c1c80e5cc9d9dc85b6e1f4013a1cec Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Rocky Linux 8.10 (Green Obsidian) Configured using: 'configure --with-x-toolkit=lucid --without-gpm --without-gconf --without-selinux --without-imagemagick --with-modules --with-gif=no --with-tree-sitter --with-native-compilation=aot PKG_CONFIG_PATH=/usr/local/home/garnish/libtree-sitter/0.22.6-1/lib/pkgconfig/' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Speed-up-vc-hg-state-by-treating-ignored-files-as-un.patch >From 591dd8d7d5e23fd03696f9a536d7f40e77ea2de4 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Thu, 7 Nov 2024 12:28:49 -0500 Subject: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered The most significant slow component of "hg status" is parsing the .hgignore file. If we pass -mardc instead of -A to hg status, hg doesn't list ignored or untracked files, so it skips parsing the .hgignore. On my large repo, this brings "hg status" from 140ms to 20ms. For vc-hg-state, the distinction doesn't matter: nothing using the output of vc-hg-state has significantly different behavior for ignored files vs unregistered files: - vc-dir-clean-files and vc-dir-recompute-file-state call vc-hg-state, but will never see an ignored file anyway since vc-dir shouldn't list ignored files for hg. - vc-next-action checks 'ignored, but it's OK to take the 'unregistered path instead; it will either fail when calling hg, or succeed. - Other users of vc-state don't differ between 'ignored and 'unregistered * lisp/vc/vc-hg.el (vc-hg-state-slow): Treat ignored files as unregistered. --- lisp/vc/vc-hg.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 856bea66a6f..2dbd1285318 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -245,7 +245,7 @@ vc-hg-state-slow "--config" "ui.report_untrusted=0" "--config" "alias.status=status" "--config" "defaults.status=" - "status" "-A" (file-relative-name file))) + "status" "-mardc" (file-relative-name file))) ;; Some problem happened. E.g. We can't find an `hg' ;; executable. (error nil))))))) @@ -260,12 +260,12 @@ vc-hg-state-slow ((eq state ?=) 'up-to-date) ((eq state ?A) 'added) ((eq state ?M) 'edited) - ((eq state ?I) 'ignored) ((eq state ?R) 'removed) ((eq state ?!) 'missing) - ((eq state ??) 'unregistered) ((eq state ?C) 'up-to-date) ;; Older mercurial versions use this. - (t 'up-to-date)))))) + ;; Ignored or untracked files don't show up; they're both + ;; treated as unregistered. + (t 'unregistered)))))) (defun vc-hg-working-revision (_file) "Hg-specific version of `vc-working-revision'." -- 2.39.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 16 20:03:47 2024 Received: (at 74243) by debbugs.gnu.org; 17 Nov 2024 01:03:47 +0000 Received: from localhost ([127.0.0.1]:55267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCThb-0001CC-5L for submit@debbugs.gnu.org; Sat, 16 Nov 2024 20:03:47 -0500 Received: from sendmail.purelymail.com ([34.202.193.197]:52800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCThY-0001Bu-UB for 74243@debbugs.gnu.org; Sat, 16 Nov 2024 20:03:45 -0500 DKIM-Signature: a=rsa-sha256; b=OCM3MmD8ZmbwCsBnBxHoRkQrXBRQtUFArg98JPB/o0G8cbzSrCym3ej5cVz5jzItMFxJb76mJ0AyXahyaSw94PwbP63l/1eFf2CCWmC3g3oruL58c4QeVBuPufv5Zc1gTx1tenRvNLUAbHqOVYpLTslBbi0t6u5WumCOipS5O8JJKU0OhEgQTCven7WN4HlkUR8dYuBVYWnlivpmzDWljGOJfzWDNM4s+5Mh5ZyI7PQcTmTa/7bwwNJjgY/yqcC/Ns+wiYViAGht09IN7pd6+wzqUHIPcdX5YjspKF3WL70sDEQbg591HrcwMfZcsAhxTITEh9xnmSYfmlmoUR7dBg==; s=purelymail2; d=spwhitton.name; v=1; bh=LFhh+3vUUaAGYzDVVfGPVLV1nRTPkgtPp+icjDxWBQ8=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=Noxm/yxNMpstofVTJ/llN6I8LuFFEVKn6ZeDtv72aY7XjU3Yx2k9DwVMOmW81wlrBH4arJOjTewf3RKQNHLSxmvUPQPsJp77q1gTjfFj9HNfkaH/fQtuzK7viH+FxfXlZICa28biCeeTLff7Mga49kPB6WjPdKq0qI1ou/wp6EZK5KHV3YH1M/61FAYH0Eq59V2K7w7KgO5M4KFgOBUvMBRJw3JagbI0USWtpmZCrxyS3KyIrj4L5n1BdtUW/T1FAk5n138MPmOPVNaFXN3BEpko05D/me/aBzAgU5xPED7TnZ3W+nRRsRj62BYKOoAXM1Py64AwYXHN+881nrknCQ==; s=purelymail2; d=purelymail.com; v=1; bh=LFhh+3vUUaAGYzDVVfGPVLV1nRTPkgtPp+icjDxWBQ8=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 74243@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -287260901; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 17 Nov 2024 01:03:33 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 498277E42C6; Sun, 17 Nov 2024 09:03:30 +0800 (CST) From: Sean Whitton To: 74243@debbugs.gnu.org Subject: Re: bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered In-Reply-To: (Spencer Baugh via's message of "Thu, 07 Nov 2024 12:41:47 -0500") References: Date: Sun, 17 Nov 2024 09:03:30 +0800 Message-ID: <87mshy7jtp.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74243 Cc: Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On Thu 07 Nov 2024 at 12:41pm -05, Spencer Baugh via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote: > The most significant slow component of "hg status" is parsing the > .hgignore file. If we pass -mardc instead of -A to hg status, hg > doesn't list ignored or untracked files, so it skips parsing the > .hgignore. On my large repo, this brings "hg status" from 140ms to > 20ms. Thanks for investigating this. > For vc-hg-state, the distinction doesn't matter: nothing using the > output of vc-hg-state has significantly different behavior for ignored > files vs unregistered files: > - vc-dir-clean-files and vc-dir-recompute-file-state call vc-hg-state, > but will never see an ignored file anyway since vc-dir shouldn't list > ignored files for hg. > - vc-next-action checks 'ignored, but it's OK to take the > 'unregistered path instead; it will either fail when calling hg, or > succeed. > - Other users of vc-state don't differ between 'ignored and > 'unregistered In vc-dir for a git repo, if I type 'G' on an unregistered file and then 'g' to refresh the view, the status label next to the unregistered file changes to "ignored". ISTM this is a nice feature that allows you to confirm that the addition to .gitignore worked. If that doesn't currently work for Hg, someone might want to implement it at some point. vc-state is a public function, so someone might well be relying on it returning 'ignored, for some other purpose. So, can we do this with a new optional argument to vc-state? Like how vc-deduce-fileset can provide more information if STATE-MODEL-ONLY-FILES is non-nil. It could be an optional argument that means to treat 'ignored and 'unregistered the same. Or something similar. It seems well-motivated to add an argument to the general vc-status because it's an operation that can be slow in large repos regardless of the backend. Though we could start by just adding an optional argument to vc-hg-status. Or, less invasive would be a vc-hg--status-internal which does it. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 26 02:52:43 2024 Received: (at 74243) by debbugs.gnu.org; 26 Nov 2024 07:52:43 +0000 Received: from localhost ([127.0.0.1]:45531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFqNG-0003Rx-Th for submit@debbugs.gnu.org; Tue, 26 Nov 2024 02:52:43 -0500 Received: from sendmail.purelymail.com ([34.202.193.197]:50550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFqNE-0003Rf-Vs for 74243@debbugs.gnu.org; Tue, 26 Nov 2024 02:52:41 -0500 DKIM-Signature: a=rsa-sha256; b=FIqeMc882Q/0RIVQKUgs6dbaso70rJH5kaoOcDKKl8pw92IfRCdCMllx3MIVdeVSJ20u5wJ6WfNfeBYK4/0dyt18NP5ptPSpDDTeCJdOU8jrLC48b5ka9Xg9Xhah5hG70GOAo4LrKeBgz1n6NWqIphUn/oXG/MI3k+UyFL/pWgRgqqA12cMi9PlV2dyCwngi85ndfv68noYROwn9/vcWLoOTUexdUWAkcVGtbm4J/1V0/e3UrATcnWnj1h7tMm647blh8ziYdTCl8xKzrfobO7xPs7jDkIqMFl3zTQOyM75sOJOPVpUSyeTqn0PwkSeU9gcdR3Teg0NsLnYUfMW9XQ==; s=purelymail1; d=spwhitton.name; v=1; bh=qVwD/nhhfCpQ0hrFTlJwssj1yj0OPvp8boSbeRuN8f8=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=N7gvmCHZFS4RPqwEaCbUiBLtLpQWXAqvPTCKV90Yx3Tn83EKJZ7OGmEJ0BqOX1sqt+6pCUsyDSueBAfdEVHbiAITDWyXShRI9yEZ/z9ImKsQZUnzhg1jYxkzLWinORpkZ/Ou8Zr5izy/q2gVaLasEtZ/XIxSBICDrXVlTIblr0HBvBJ43K7GTytmRPR4d8grSqfdhHL8TVloJYjRHrOcj7fuf4BIDXApqs6kgeVGU7zlRUKaf0oYPg0H6G0JcDF4EQLo77NgRlZhwcBx5I9mk7Rshq0R0aiMlB8WK2xFfiVzAXuM77C5l18oG1yFMnzduG6Vvw8IdK6GNMY9CIEaLA==; s=purelymail1; d=purelymail.com; v=1; bh=qVwD/nhhfCpQ0hrFTlJwssj1yj0OPvp8boSbeRuN8f8=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 74243@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1795065679; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 26 Nov 2024 07:52:33 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 4CFDE7ED990; Tue, 26 Nov 2024 15:52:29 +0800 (CST) From: Sean Whitton To: Spencer Baugh Subject: Re: bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered In-Reply-To: (Spencer Baugh's message of "Tue, 19 Nov 2024 08:28:59 -0500") References: <87mshy7jtp.fsf@melete.silentflame.com> Date: Tue, 26 Nov 2024 15:52:29 +0800 Message-ID: <87r06ytosi.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74243 Cc: 74243@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On Tue 19 Nov 2024 at 08:28am -05, Spencer Baugh wrote: > The original motivation of optimizing 'state is to speed up > vc-refresh-state and vc-after-save, since they call vc-hg-state in > find-file-hook and after-save-buffer, which adds very noticeable > latency. (I care less about the speed of vc-dir, which uses > 'dir-status-files not 'state) > > So those functions would need to pass this argument. But they (through > vc-state-refresh) then store the returned state in 'vc-state in the VC > per-file properties, so anyone accessing that will also see the effect > of this argument. I see what you mean. Quoting vc-state, | A return of nil from this function means we have no information on the | status of this file. | [...] | `ignored' The file showed up in a dir-status listing with a flag | indicating the version-control system is ignoring it, | Note: This property is not set reliably (some VCSes | don't have useful directory-status commands) so assume | that any file with vc-state nil might be ignorable | without VC knowing it. | | `unregistered' The file is not under version control." | | ;; Note: we usually return nil here for unregistered files anyway | ;; when called with only one argument. This doesn't seem to cause | ;; any problems. But if we wanted to change that, we should | ;; probably opt for redefining the `registered' command to return | ;; non-nil even for unregistered files (maybe also rename it), and | ;; then make sure that all `state' implementations handle | ;; unregistered file appropriately. (I think there's a mistake here: an ignored file is not a file "under version control", so `unregistered' should say "not under version control and not ignored". Would you agree?) Thanks for pointing out the involvement of find-file-hook and after-save-hook. The problem you describe is not at all Hg-specific: vc-state gets called in a context where speed matters, but it's also the primary entry point for any code that wants to know the state of a file, some of which might care more about accuracy than speed. To put it another way, the code assumes throughout that finding out the file state will always be fast. But it also assumes the information is accurate if present. This makes me queasy about your original patch. It does not seem wise to return something we don't know to be true only on the basis that it all works out fine for now. The 'nil' return value might provide us with a way out, however. Could we add an optional argument to vc-state that means "just return nil if finding out the state properly might be slow"? Could we make vc-after-save and the relevant find-file-hook entry pass that option through, and do something sensible with a nil return value? If they get nil, they would clear out the saved property, and possibly update the mode line display to "????" or something. Maybe we'd want a user option (that could go in your large repo's .dir-locals.el, so it's set-and-forget) to opt-in to not knowing the file state as often. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 26 18:26:40 2024 Received: (at 74243) by debbugs.gnu.org; 26 Nov 2024 23:26:40 +0000 Received: from localhost ([127.0.0.1]:55424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG4x5-0007ep-SO for submit@debbugs.gnu.org; Tue, 26 Nov 2024 18:26:40 -0500 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]:57031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG4x3-0007eX-7H for 74243@debbugs.gnu.org; Tue, 26 Nov 2024 18:26:38 -0500 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 69879114016B; Tue, 26 Nov 2024 18:26:31 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Tue, 26 Nov 2024 18:26:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1732663591; x=1732749991; bh=pJbwPtyrEAA9WP6KXbWe9QWoWgfBMsRlbewZeX+Du1g=; b= N3lOPIit11/4KdO4QzOUOqzUsT1O3UiKJ8qtfWMOB8IoVdzDJav+tI3iI9NzO7Fh xnO+tZC9/RaEpgyznVGCxlzWkXzxqle6TZVSCf+iZMYXeECErM0uVFKy/Ewp05nl jYqfih78n+ec057G8zBLSXhoEfronKW0RwW+uISF41fR2v1ERjieF8y1EukOm0VI wo2gOUNv4o2fcVlpMdMHsvBtO1AZBtsTKfkFUiqf7QhhxYmPoChJVbJjAjTshq+Y SjZk0Ij5D3Inh73MFXHAGuDin++90qeJ6MZtrurY5fPpu5lIg2Zzo0huonvqThLM nDypcYUMfDpXGtN8X5/Prw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1732663591; x= 1732749991; bh=pJbwPtyrEAA9WP6KXbWe9QWoWgfBMsRlbewZeX+Du1g=; b=s kVXvA+ya+e8dehtleD0ij/z472WKeMZuh26TZ9OZ/DpDaAzlJiheUhMpI25TdCsp Jyc21VxpUYyCWyWebuRbF57Dh++nOlU7D1/FHtL3WD/8dI4fxtMoQ9a95TstSUxq cfjghWVrfsFMyqDMhRIDqr2Bo3lv9M592xnAsuwzrI2Eyezn/3HNmTcRDtP3XuP7 3DHMAzqPmq3mAcTxuQmxFxvy0O68E7yzMxAbLDe+QSuVKtYohMcKexcYrQCent6n An+TcgLtvYuRPE65kMA0wR2j00t3wTEz5pYsiX0ZgYcW65CSIfXK0ZVMcF3rh9V1 GmQfJBSR8xLyHGnJeqr2Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgeekgddutdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedt vddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfi hhihhtthhonhdrnhgrmhgvpdhrtghpthhtohepshgsrghughhhsehjrghnvghsthhrvggv thdrtghomhdprhgtphhtthhopeejgedvgeefseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Nov 2024 18:26:28 -0500 (EST) Message-ID: <802729a0-6937-48a7-9ce5-bd81e8548877@gutov.dev> Date: Wed, 27 Nov 2024 01:26:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered To: Sean Whitton , Spencer Baugh References: <87mshy7jtp.fsf@melete.silentflame.com> <87r06ytosi.fsf@melete.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87r06ytosi.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74243 Cc: 74243@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, just to interject a little. On 26/11/2024 09:52, Sean Whitton wrote: > (I think there's a mistake here: an ignored file is not a file "under > version control", so `unregistered' should say "not under version > control and not ignored". Would you agree?) > > Thanks for pointing out the involvement of find-file-hook and > after-save-hook. The problem you describe is not at all Hg-specific: > vc-state gets called in a context where speed matters, but it's also the > primary entry point for any code that wants to know the state of a file, > some of which might care more about accuracy than speed. > > To put it another way, the code assumes throughout that finding out the > file state will always be fast. But it also assumes the information is > accurate if present. This makes me queasy about your original patch. > It does not seem wise to return something we don't know to be true only > on the basis that it all works out fine for now. This FR reminds me of a similar change in vc-git-state that we ended up installing in bug#11757 (in 2012). Then stayed with it until 2017 when bug#19343 was filed and fixed (provided a recent enough Git is used) - see also the problem scenario described there. So it seems both a reasonable change and ultimately not ideal. Depending on how many users we think might be affected by performance here. > The 'nil' return value might provide us with a way out, however. > Could we add an optional argument to vc-state that means "just return > nil if finding out the state properly might be slow"? > Could we make vc-after-save and the relevant find-file-hook entry pass > that option through, and do something sensible with a nil return value? > > If they get nil, they would clear out the saved property, and possibly > update the mode line display to "????" or something. Maybe we'd want a > user option (that could go in your large repo's .dir-locals.el, so it's > set-and-forget) to opt-in to not knowing the file state as often. A user option seems like an easier choice. Solutions that clear cache under some conditions or other tend to be more complex, and slow down at least some combined scenarios (e.g. one of my use cases is saving the buffer and having diff-hl-mode use its vc state from after-save-hook). From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 26 18:32:46 2024 Received: (at 74243) by debbugs.gnu.org; 26 Nov 2024 23:32:46 +0000 Received: from localhost ([127.0.0.1]:55435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG52z-0007wu-SG for submit@debbugs.gnu.org; Tue, 26 Nov 2024 18:32:46 -0500 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:52835) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG52x-0007wb-Ue for 74243@debbugs.gnu.org; Tue, 26 Nov 2024 18:32:44 -0500 From: Spencer Baugh To: Dmitry Gutov Subject: Re: bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered In-Reply-To: <802729a0-6937-48a7-9ce5-bd81e8548877@gutov.dev> (Dmitry Gutov's message of "Wed, 27 Nov 2024 01:26:26 +0200") References: <87mshy7jtp.fsf@melete.silentflame.com> <87r06ytosi.fsf@melete.silentflame.com> <802729a0-6937-48a7-9ce5-bd81e8548877@gutov.dev> Date: Tue, 26 Nov 2024 18:32:38 -0500 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1732663958; bh=6FKEvTmZXdpSwF4vnisf4TQku+at3iFCg+0HknzTIL4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=cL8Sm1Svn3v1aDUx6h9gAhT+fvogAYt762g7Y4FXBN7GzHnl/fAB//kQ0OyQtyLFM 1iczqgyosJlWvvZFISD4z7U90RK2OKjs6a0j1aSeDxYYCQ20Wuj6Hqjhy3OycjqGxm 9ih/X86l5nM/j1qzZPw/UUrTeUWFYJyxAomM9DYYgRGBBGgGQ04MbrDZq8iLzUO6gN BOriSkEMyBkTqdELq9CExrqD/QvG/0LTWK4Kzj0Qc0MDN/0jOC22MK5YAdkjJlj2L/ Cg6Nb217Xlce9dUuBbwAeq2tBW5g1beBomAtLwfM1UfltFfld6ZFwG02rYP0ZaohPy m0n7fk9wxJdbw== X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 74243 Cc: 74243@debbugs.gnu.org, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Dmitry Gutov writes: > Hi, just to interject a little. > > On 26/11/2024 09:52, Sean Whitton wrote: >> (I think there's a mistake here: an ignored file is not a file "under >> version control", so `unregistered' should say "not under version >> control and not ignored". Would you agree?) >> Thanks for pointing out the involvement of find-file-hook and >> after-save-hook. The problem you describe is not at all Hg-specific: >> vc-state gets called in a context where speed matters, but it's also the >> primary entry point for any code that wants to know the state of a file, >> some of which might care more about accuracy than speed. >> To put it another way, the code assumes throughout that finding out >> the >> file state will always be fast. But it also assumes the information is >> accurate if present. This makes me queasy about your original patch. >> It does not seem wise to return something we don't know to be true only >> on the basis that it all works out fine for now. > > This FR reminds me of a similar change in vc-git-state that we ended > up installing in bug#11757 (in 2012). Then stayed with it until 2017 > when bug#19343 was filed and fixed (provided a recent enough Git is > used) - see also the problem scenario described there. > > So it seems both a reasonable change and ultimately not > ideal. Depending on how many users we think might be affected by > performance here. > >> The 'nil' return value might provide us with a way out, however. >> Could we add an optional argument to vc-state that means "just return >> nil if finding out the state properly might be slow"? >> Could we make vc-after-save and the relevant find-file-hook entry pass >> that option through, and do something sensible with a nil return value? >> If they get nil, they would clear out the saved property, and >> possibly >> update the mode line display to "????" or something. Maybe we'd want a >> user option (that could go in your large repo's .dir-locals.el, so it's >> set-and-forget) to opt-in to not knowing the file state as often. > > A user option seems like an easier choice. > > Solutions that clear cache under some conditions or other tend to be > more complex, and slow down at least some combined scenarios (e.g. one > of my use cases is saving the buffer and having diff-hl-mode use its > vc state from after-save-hook). These are all reasonable concerns. Since posting my original patch, though, I've heard from Hg developers that they plan to eventually implement per-directory ignore files, like in Git. That would remove the original performance problem, so maybe this is not so important. That being said, it's still sad that the vc hooks in find-file-hook and after-save-hook can hurt performance so much. It seems to me that the ideal outcome would be to support asynchronicity in those hooks. That would benefit all vc backends... though this is perhaps quite difficult. Maybe asynchronously populating the saved vc-state property would work? With some clever usage of nil return values as Sean describes... From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 26 19:18:51 2024 Received: (at 74243) by debbugs.gnu.org; 27 Nov 2024 00:18:51 +0000 Received: from localhost ([127.0.0.1]:55491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG5lb-0001bi-Cf for submit@debbugs.gnu.org; Tue, 26 Nov 2024 19:18:51 -0500 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]:55925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG5lZ-0001bQ-DL for 74243@debbugs.gnu.org; Tue, 26 Nov 2024 19:18:50 -0500 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id CEAEE254011B; Tue, 26 Nov 2024 19:18:43 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Tue, 26 Nov 2024 19:18:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1732666723; x=1732753123; bh=CLfaqt510JPAczD20Em3M9YZW2BzlCXsKzoekwy9G+4=; b= EU4C8kHofJmOuFO1beDBAMHW5cqv9lJGGibvmks4dz+gqVhks2Qsgx0WMd8qQcAM Ky+nJ1pJ+zHBIEN/gv9/s//A1sBqZLZ/lbAl+YNp1r1RZaau6Cu+G72b6mv97uI5 nsw/YU3aAiFfk/6cfwDc5cMJppzc2jUelYylTjqpp806xUAzVr6l9fmPzYGm5ORq 3lnOKn3/o+PQVst6+4iZtLhmHSy1zJyPZ5MBXY0KCGar31vxLZfFIm+po0ckp6zs Sf/r4nGbBeXnr16fZl/A69kZaQoFHZ4gkGGvu9tyUx5pFdUVlGh0hspMz+ENfrVW VXYBSN3AhVV9PsEZhEOF3w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1732666723; x= 1732753123; bh=CLfaqt510JPAczD20Em3M9YZW2BzlCXsKzoekwy9G+4=; b=G seY43A002WPhJOcENvOkmPRe1a28USVqyY1Q+YbN2koOLN8PAP0hXmAgBHRO/5xL bB5cAJpA385n45SoiSFe96XPZBSA5MBQE/Z3bzXSzI+uoEr7H4bpvflsi2+ctbqU 0egb4ean9aKlwe9Gp9leTs9md2ga2weAv7RjVaHqP2yZxvfbyvNkd+eBwUwWcR5n Q35zcv/USZL72HoMknbTgjdlwu48HvwrxJFWseK+FQKDXnx/85R3GuufPXg6bn3Z SGhV8Hx0nUqc/ex3cQLbHe3JbIWY/vr7g4JVOUjNreGIEsZ7Lhzk6lc2DWwqcBhg R14eYQQ7seQn5tLMLpvHA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgeekgddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedt vddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgsrghughhhsehjrghnvghsth hrvggvthdrtghomhdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhn rdhnrghmvgdprhgtphhtthhopeejgedvgeefseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Nov 2024 19:18:41 -0500 (EST) Message-ID: <48e27733-61a8-49d2-94b2-109c98b3dd7f@gutov.dev> Date: Wed, 27 Nov 2024 02:18:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered To: Spencer Baugh References: <87mshy7jtp.fsf@melete.silentflame.com> <87r06ytosi.fsf@melete.silentflame.com> <802729a0-6937-48a7-9ce5-bd81e8548877@gutov.dev> Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74243 Cc: 74243@debbugs.gnu.org, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 27/11/2024 01:32, Spencer Baugh wrote: >> A user option seems like an easier choice. >> >> Solutions that clear cache under some conditions or other tend to be >> more complex, and slow down at least some combined scenarios (e.g. one >> of my use cases is saving the buffer and having diff-hl-mode use its >> vc state from after-save-hook). > > These are all reasonable concerns. > > Since posting my original patch, though, I've heard from Hg developers > that they plan to eventually implement per-directory ignore files, like > in Git. That would remove the original performance problem, so maybe > this is not so important. That's good to hear. > That being said, it's still sad that the vc hooks in find-file-hook and > after-save-hook can hurt performance so much. Understandable, that's what drove me to implement that older change in Git back then. > It seems to me that the ideal outcome would be to support asynchronicity > in those hooks. That would benefit all vc backends... though this is > perhaps quite difficult. The most complex part could be retaining a compatible/synchronous API. > Maybe asynchronously populating the saved vc-state property would work? > With some clever usage of nil return values as Sean describes... Maybe Sean's idea is better, but to spitball different options: - FWIW since not too long ago we've treated a similar issue in diff-hl by using a thread - which calls the same code inside (meaning the current synchronous implementation), but it happens in the background, so the input is unfrozen and the visual update is asynchronous. But keeping in mind that threads' error handling is not great, so it seems not optimal to keep a lot of implementation code inside a thread. Also, threads are reportedly not good with remote calls yet. - The mode-line update isn't going to wait asynchronously, though, but perhaps an update could be scheduled. If state updates are not synchronous, I suppose this would also need some debouncing/queueing mechanism for the callers as well. That is the route of migrating to a different calling convention, though. - Finally, if the main scenario that we are concerned is the use in vc-dir, we could try switching only its updates to another backend call. E.g. vc-dir-resynch-file would switch to the (possibly) more precise - though slower - dir-status-files, just like the code that first populates that buffer. vc-state could then afford shortcuts more safely. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 29 03:17:45 2024 Received: (at 74243) by debbugs.gnu.org; 29 Nov 2024 08:17:45 +0000 Received: from localhost ([127.0.0.1]:40851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGwC9-0001bB-40 for submit@debbugs.gnu.org; Fri, 29 Nov 2024 03:17:45 -0500 Received: from sendmail.purelymail.com ([34.202.193.197]:44718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGwC7-0001au-LM for 74243@debbugs.gnu.org; Fri, 29 Nov 2024 03:17:44 -0500 DKIM-Signature: a=rsa-sha256; b=JhLyc/9yvfJ9TpMD3I8nU7YnGFWfxgDZXnyDY5pn4ry7SEJiPOIpR9rhDfhA52Af7xBzVmM++hZmb98x995m/ZtgYQZCYp1XB193ZxEhKVnrN5l+W7XY0EuwpU++7WwywO2lirK66rtl1yr93H4JBa7cqZXWr1DxlowGV4MCXWEz+H6nYmbgi1GOrLeL8lmePYb1wTMfCTunR17A4Nyo5BNHq8M7N778LUpuk5wgCdPo5KWdOeAwDjr+EmU4f7JBrkaw/LsXMD4Y9OQV/BTtR5OLMCzm9FpAM7lDXUNTyaY4gbzz2124nk9nDMUJw0AQQYsGtvE6yNUBPARWIP71kA==; s=purelymail1; d=spwhitton.name; v=1; bh=oDZh2YXmIAjf4evSZOf+L7ES2RzsYtpnhzWTFO0NuRU=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=Oie4mFQWNAscBaL+R50dBo1xhCCuAusr+/a/Y1WWk8G2W/aj3g55T3tCPV4RHbo52pTH3l8G4tTwXKECxTvhgchH3X7ub/9YnO2Qx1MltyNtL15vD7KOH+swavb1/vjq7M9S0FdB9uPd6wr7Vsq6GOYRWMvftkB7Adt30uleJNQFXwM0QQEyD3ACeQAjPTlYrujvYD3gR0F9aOGTjtM1jvY+9Oq+2XzXlZt5LKBNHVywb7cHwnSwVOUOGq7MtvgTLOK4fnkmcNTb85toVnrhpIbgYiFNbknuu9VulFye/Yn8cf3lvDT6O28XKDwfK43NWv/Mlz7dIcuKZ4hCQCmZTA==; s=purelymail1; d=purelymail.com; v=1; bh=oDZh2YXmIAjf4evSZOf+L7ES2RzsYtpnhzWTFO0NuRU=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 74243@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -730060725; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 08:17:36 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 2D37E7EA3E4; Fri, 29 Nov 2024 16:17:33 +0800 (CST) From: Sean Whitton To: Dmitry Gutov Subject: Re: bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered In-Reply-To: <48e27733-61a8-49d2-94b2-109c98b3dd7f@gutov.dev> (Dmitry Gutov's message of "Wed, 27 Nov 2024 02:18:39 +0200") References: <87mshy7jtp.fsf@melete.silentflame.com> <87r06ytosi.fsf@melete.silentflame.com> <802729a0-6937-48a7-9ce5-bd81e8548877@gutov.dev> <48e27733-61a8-49d2-94b2-109c98b3dd7f@gutov.dev> Date: Fri, 29 Nov 2024 16:17:33 +0800 Message-ID: <87ed2u8ndu.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74243 Cc: Spencer Baugh , 74243@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On Wed 27 Nov 2024 at 02:18am +02, Dmitry Gutov wrote: > Maybe Sean's idea is better, but to spitball different options: > > - FWIW since not too long ago we've treated a similar issue in diff-hl by > using a thread - which calls the same code inside (meaning the current > synchronous implementation), but it happens in the background, so the input > is unfrozen and the visual update is asynchronous. > > But keeping in mind that threads' error handling is not great, so it seems not > optimal to keep a lot of implementation code inside a thread. Also, threads > are reportedly not good with remote calls yet. > > - The mode-line update isn't going to wait asynchronously, though, but perhaps > an update could be scheduled. If state updates are not synchronous, I > suppose this would also need some debouncing/queueing mechanism for the > callers as well. That is the route of migrating to a different calling > convention, though. Thanks for these ideas. Spencer, do you mind if I close this bug? It's clear that we could be doing something better here, but given the news from Hg upstream, we probably don't want to make changes along the lines of your original patch. > - Finally, if the main scenario that we are concerned is the use in vc-dir, we > could try switching only its updates to another backend > call. E.g. vc-dir-resynch-file would switch to the (possibly) more precise - > though slower - dir-status-files, just like the code that first populates > that buffer. vc-state could then afford shortcuts more safely. Just to note, my concern was that vc-state is a public function and we don't know where it's being used, so vc-dir is not the main concern. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 29 07:43:28 2024 Received: (at 74243) by debbugs.gnu.org; 29 Nov 2024 12:43:28 +0000 Received: from localhost ([127.0.0.1]:41405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tH0LI-0006JO-5t for submit@debbugs.gnu.org; Fri, 29 Nov 2024 07:43:28 -0500 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:38083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tH0LF-0006J7-0t for 74243@debbugs.gnu.org; Fri, 29 Nov 2024 07:43:25 -0500 Received: from mail-ej1-f71.google.com ([209.85.218.71]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.98) id 1tH0L9-0000000193b-1s7u for 74243@debbugs.gnu.org; Fri, 29 Nov 2024 07:43:19 -0500 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-aa50cf10593so112193566b.0 for <74243@debbugs.gnu.org>; Fri, 29 Nov 2024 04:43:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1732884198; x=1733488998; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=44MEbq6cDf6B+2g3RQrmHo1ra6xNFdNFqvQ1TJAhCF4=; b=FtEhsGI3IQ6GYHWmsTt5hURBnHWFf1+2gU28dhemLoH/cFlbuQ0gcsvigix87GCIFT MLAR+tK+SXxhNG1sa+rGhOPG0fwWWJW6ZPhzVs7zL+LIxVtTNXlAzooTUgpxrp0GAEEY ymyDLsPb8OhcFouRLEiOhwxIBpEPY/FqhVk0Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1732884199; bh=44MEbq6cDf6B+2g3RQrmHo1ra6xNFdNFqvQ1TJAhCF4=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=r74fZo8o7Nrlpz91WxACHT+bWvyIqTtpgoRnKKADYDDO1Ch4Q3XOGTkkGxOM5/jbn uVq4z7vQS/1DecQOWY4RAqgdw7OdaMK84Uw0nMXnDUw7eGMhS3WDz4nieGvB8X51IP 8qTJzVAi1zf3OcFnne9ZScO9Shp5kSGyUblNlbmGSXtjM7cD+cQgtmiSLeNDlMwxVP krbdsa8B2moT+pNGaq6ZwKT+aIDCFc0N/OfzC3wADbNEIZ78zwwOlKwoR1164fzodA jd6cEtYBf0uPrrY3UOt0ypMxf9BA0iwqDUi+aObzak3vbHIXjW/BbYuS77PSGCZsqZ ELcKzMpnjuhrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732884198; x=1733488998; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=44MEbq6cDf6B+2g3RQrmHo1ra6xNFdNFqvQ1TJAhCF4=; b=gRmmCiKoCU4ZLaGCUwr/oIHm0J6bL4f/2EPOvOmqRKH5hcENSLQ+4yP/RB6H/SD6/F QtrbET3qWFixrn0afqT42mToyt/6c1nxV4DvMA6yVf7AHLCuXOPlhcmcZfLXgVmVW6TE +D/i58dV6uY94vQMk0aw6nraA+QK4F95j90O/DttXDQX1/Kou73zxQ8Jwpl9sHwDURtz ijrxHbnCXAjYhss+5e2okddomRTaUI30Nnn280zfyfJqMuZUKh4ng8SJ3zwqDgVimmim +jAZGNMZ7DgkxkZl5STwG51pFSzdaWoKT7a59t9qYzRqR1FXgvszCtL1gO0wvg0MVdIj kcjg== X-Forwarded-Encrypted: i=1; AJvYcCU03oHH2VBCz/VBh/QleoOajOqebDOgc7E+Ely2z8FeVwW+iMlUbIvv1SnoWDnxOvxVweOsyg==@debbugs.gnu.org X-Gm-Message-State: AOJu0Ywk51CXSEoV7dHtynGq1htUkXWOTaWp3Opk3oj42A7LqeHfI0ka uEI9pXtvtRbU62ruig2yIOF8wPq8NuaqCGV1ssYth29M9ppvNA58FLaqzGM1kDihZT5a0Do9R5u wFUuvoc1he3N/0XgoW4RW/AsckAF941tn8YRgjDHnmgfh2YrtiYJ5hTlRXSVC/2U+E12Pb3tN45 jTV6l0d4STdUHN73geLAxvUY7cwryLzZFkgg== X-Gm-Gg: ASbGncsqBHevjAyP8dvNltcksK/40ky+qEz+Qr/jSC+YBeZiw1ldWDAwJxQX+79qRU1 tDMEWh7Er2UsAfnjl5LkffAQiizv1Un8= X-Received: by 2002:a17:907:1dc5:b0:a9a:835b:fc8e with SMTP id a640c23a62f3a-aa581062725mr778315966b.54.1732884198311; Fri, 29 Nov 2024 04:43:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+DwVU4ICEFYc/7yaPAaK2YsYGUxpDENw0zMaU2kNmMk+lS9C8RHkoc0iJW6abooLn44DepkGT2Ot0e40YXic= X-Received: by 2002:a17:907:1dc5:b0:a9a:835b:fc8e with SMTP id a640c23a62f3a-aa581062725mr778313666b.54.1732884197821; Fri, 29 Nov 2024 04:43:17 -0800 (PST) MIME-Version: 1.0 References: <87mshy7jtp.fsf@melete.silentflame.com> <87r06ytosi.fsf@melete.silentflame.com> <802729a0-6937-48a7-9ce5-bd81e8548877@gutov.dev> <48e27733-61a8-49d2-94b2-109c98b3dd7f@gutov.dev> <87ed2u8ndu.fsf@melete.silentflame.com> In-Reply-To: <87ed2u8ndu.fsf@melete.silentflame.com> From: Spencer Baugh Date: Fri, 29 Nov 2024 07:43:09 -0500 Message-ID: Subject: Re: bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered To: Sean Whitton Content-Type: multipart/alternative; boundary="0000000000000c73b506280c8b17" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74243 Cc: Dmitry Gutov , 74243@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --0000000000000c73b506280c8b17 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Nov 29, 2024, 3:17=E2=80=AFAM Sean Whitton wrote: > Spencer, do you mind if I close this bug? It's clear that we could be > doing something better here, but given the news from Hg upstream, we > probably don't want to make changes along the lines of your original > patch. > Agreed, go ahead. > --0000000000000c73b506280c8b17 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Nov 29, 2024, 3:17=E2=80=AFAM Sean Whitton <spwhitton@spwhitton.name> w= rote:
Spencer, do you mind if I clo= se this bug?=C2=A0 It's clear that we could be
doing something better here, but given the news from Hg upstream, we
probably don't want to make changes along the lines of your original patch.

Agreed, go ahead.
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
--0000000000000c73b506280c8b17-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 29 18:45:39 2024 Received: (at 74243-close) by debbugs.gnu.org; 29 Nov 2024 23:45:39 +0000 Received: from localhost ([127.0.0.1]:44788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHAg7-0000EW-48 for submit@debbugs.gnu.org; Fri, 29 Nov 2024 18:45:39 -0500 Received: from sendmail.purelymail.com ([34.202.193.197]:50972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHAg4-0000E6-GR for 74243-close@debbugs.gnu.org; Fri, 29 Nov 2024 18:45:37 -0500 DKIM-Signature: a=rsa-sha256; b=wKsEGmPN8DEX/p7rhH8WskPAkrw/hVNKSDc3y3KEI2+uMQmg0IlZjIHTLGQStamO6OqBkEaqXjnJZv1OO4TDy3QfXDpMOuSZe1w7QYh2Ru+CBxvE7cNpUBy5Xy4/1dYI40kPZFm/iH8XVcJUXlt03AhQe/mgtgY9SSBJAFA7eqw+Uuu33O3OhCdjQuGP0aa7sMUYHQTUK9Uhx2Q93cLUKKElySDTnJudzXzpDvSKEFqhhD/8MjcxxQIphXny17oQ+H98K6fcelJ0VXChykK1hGcf7ulMvnYfIhGTQGR9Dl8lUukyhiJuaiMANCyOmuuWxv6Km7FEL6sEDmBSyt7Eog==; s=purelymail1; d=spwhitton.name; v=1; bh=M8viSL0zihG1j4SudncPjxZPLSLApUGah+Fcv/BaOjg=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=sfvtOCCnmwuIRZs7qOOYtIGz6Ib1KZEnt8/4JhxkNEPD5k98jF2FvuYSOFMpOk0T7VtdvDLz2cKycX1IkP3e1bXvKdpm5fn0wkp5Y+QoVbaXlr/D29jgpEY0ceBiOb0SjVwIjBhjbIBQ49AZJsdva5mcxCZ6A+zzD2kkEKL18PP9x/6kTLdCDTa3lzyMh2RSuqVDPlUK21jCeJdyQHZujMC1GO9UTuZQeMwALhpTy36nK8wswiQsAq8PMvJ2xsMQfdLjjeJv9/YCpJ0DDjY6V5+kvmuKCYyMV88ZaWe1KZPO67FXQfVcKbwG9xVtpC8dHr5Zp9ftY86gR25VndVafQ==; s=purelymail1; d=purelymail.com; v=1; bh=M8viSL0zihG1j4SudncPjxZPLSLApUGah+Fcv/BaOjg=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 74243-close@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1921357670; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 23:45:30 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 331CC7E1EE2; Sat, 30 Nov 2024 07:45:27 +0800 (CST) From: Sean Whitton To: Spencer Baugh Subject: Re: bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered In-Reply-To: (Spencer Baugh via's message of "Fri, 29 Nov 2024 07:43:09 -0500") References: <87mshy7jtp.fsf@melete.silentflame.com> <87r06ytosi.fsf@melete.silentflame.com> <802729a0-6937-48a7-9ce5-bd81e8548877@gutov.dev> <48e27733-61a8-49d2-94b2-109c98b3dd7f@gutov.dev> <87ed2u8ndu.fsf@melete.silentflame.com> Date: Sat, 30 Nov 2024 07:45:27 +0800 Message-ID: <87zflh7gfc.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74243-close Cc: 74243-close@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On Fri 29 Nov 2024 at 07:43am -05, Spencer Baugh via "Bug reports for GNU E= macs, the Swiss army knife of text editors" wrote: > On Fri, Nov 29, 2024, 3:17=E2=80=AFAM Sean Whitton wrote: > > Spencer, do you mind if I close this bug? It's clear that we could be > doing something better here, but given the news from Hg upstream, we > probably don't want to make changes along the lines of your original > patch. > > Agreed, go ahead. Coolio, thanks. --=20 Sean Whitton From unknown Sun Jun 22 17:17:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 28 Dec 2024 12:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator