all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: Spencer Baugh <sbaugh@janestreet.com>, 74243@debbugs.gnu.org
Subject: bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered
Date: Fri, 29 Nov 2024 16:17:33 +0800	[thread overview]
Message-ID: <87ed2u8ndu.fsf@melete.silentflame.com> (raw)
In-Reply-To: <48e27733-61a8-49d2-94b2-109c98b3dd7f@gutov.dev> (Dmitry Gutov's message of "Wed, 27 Nov 2024 02:18:39 +0200")

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





  reply	other threads:[~2024-11-29  8:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07 17:41 bug#74243: [PATCH] Speed up vc-hg-state by treating ignored files as unregistered Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-17  1:03 ` Sean Whitton
     [not found]   ` <ierttc3z71g.fsf@janestreet.com>
2024-11-26  7:52     ` Sean Whitton
2024-11-26 23:26       ` Dmitry Gutov
2024-11-26 23:32         ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-27  0:18           ` Dmitry Gutov
2024-11-29  8:17             ` Sean Whitton [this message]
2024-11-29 12:43               ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-29 23:45                 ` Sean Whitton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ed2u8ndu.fsf@melete.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=74243@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=sbaugh@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.