unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Spencer Baugh <sbaugh@janestreet.com>
To: 66364@debbugs.gnu.org
Subject: bug#66364: 29.1.50; vc-hg-registered/state are slow on directories of large repos
Date: Thu, 05 Oct 2023 11:33:32 -0400	[thread overview]
Message-ID: <ierpm1t6q43.fsf@janestreet.com> (raw)


vc-hg-state (and vc-hg-registered, which calls vc-hg-state) are slow
when run on directories of large repos.  In fact they're O(N) in the
number of files in the repo.

This is because vc-hg-state-slow runs "hg status" on directories in a
mode which lists all the files in the directory, and then it parses that
list.  Which is pointlessly slow.

However, Hg (like git) does not actually track directories.  So in the
end vc-hg-state on a directory should always be returning 'unregistered,
which matches the existing behavior of vc-hg (vc-hg-registered always
returned nil for directories) and is much faster.  (It also matches what
vc-git does.)

A patch to do this will follow





             reply	other threads:[~2023-10-05 15:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 15:33 Spencer Baugh [this message]
2023-10-05 15:36 ` bug#66364: 29.1.50; vc-hg-registered/state are slow on directories of large repos Spencer Baugh
2023-10-05 16:09   ` Dmitry Gutov
2023-10-05 16:19     ` Spencer Baugh
2023-10-05 17:06       ` Dmitry Gutov
2023-10-13  1:09         ` sbaugh
2023-10-14 17:02           ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=ierpm1t6q43.fsf@janestreet.com \
    --to=sbaugh@janestreet.com \
    --cc=66364@debbugs.gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).