From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs Subject: bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered Date: Fri, 29 Nov 2024 16:17:33 +0800 Message-ID: <87ed2u8ndu.fsf@melete.silentflame.com> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10188"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Spencer Baugh , 74243@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 29 09:18:21 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tGwCi-0002RV-K9 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Nov 2024 09:18:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGwCT-0005gL-CJ; Fri, 29 Nov 2024 03:18:05 -0500 Original-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 1tGwCR-0005g9-D2 for bug-gnu-emacs@gnu.org; Fri, 29 Nov 2024 03:18:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tGwCR-0000Fn-4F for bug-gnu-emacs@gnu.org; Fri, 29 Nov 2024 03:18:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=vFuQ8jw41aSkgw+dMMYKFd3BT+dOpW+AGMfVPcxQ8wM=; b=JMSKfNbBiXXSdRFHPWcSeOv8gqkhyBev9IleBKwKSm1XYJL/RAJv+gG64OdRb4/r4yOkwak/X6uYTDMpQ4eZpeNoN/IWE1EJRSljp8EMaCxsJeIIU4pGO+wQfhq86hwevCq5VfrcO8PGcL0RF+Fu1I2RpQ+oJ/mCYpovad0pqtMMrsl0trUy97fGONDeoC4ag3xpehYR2Ew/FTEbgts9AC0a9B6QKAlnQehi13BtuLVzg2uodAZxJ8C7e8XcsC70Y1fDC9vf//5eKNy2b7gNYwZJHmikC7q8fVqC8vNeHMs4wUQGDGmag5GIze0qlMsIiUU/sh/OyzmVSD+3mYpgDw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tGwCQ-0001bt-M4 for bug-gnu-emacs@gnu.org; Fri, 29 Nov 2024 03:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Nov 2024 08:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74243 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74243-submit@debbugs.gnu.org id=B74243.17328682656155 (code B ref 74243); Fri, 29 Nov 2024 08:18:02 +0000 Original-Received: (at 74243) by debbugs.gnu.org; 29 Nov 2024 08:17:45 +0000 Original-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 Original-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 Original-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) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id 2D37E7EA3E4; Fri, 29 Nov 2024 16:17:33 +0800 (CST) In-Reply-To: <48e27733-61a8-49d2-94b2-109c98b3dd7f@gutov.dev> (Dmitry Gutov's message of "Wed, 27 Nov 2024 02:18:39 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296085 Archived-At: 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