GNU bug report logs -
#74243
[PATCH] Speed up vc-hg-state by treating ignored files as unregistered
Previous Next
Reported by: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Thu, 7 Nov 2024 17:42:01 UTC
Severity: normal
Tags: patch
Done: Sean Whitton <spwhitton <at> spwhitton.name>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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/'
[0001-Speed-up-vc-hg-state-by-treating-ignored-files-as-un.patch (text/patch, attachment)]
This bug report was last modified 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.