1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-17 08:31:09 -08:00
emacs/lisp/progmodes
Spencer Baugh b71fa27987 In rgrep, check matching files before excluding files
There are a lot of excluding globs, and checking them all is expensive.
The files glob (i.e. the glob for files we actually want) is usually
just one or two entries, so it's quite fast to check.

If find checks the files glob first and then the excluding glob, it has
to do much less checking (since the files glob will substantially narrow
down the set of files on its own), and find performance is much better.

In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/")
from ~410ms to ~130ms.

Further optimizations are possible now that the ignores and matched
files are in the same <F> argument which can be rearranged more easily
without compatibility issues; I'll do those optimizations in later
commits.

* lisp/progmodes/grep.el (rgrep-find-ignores-in-<f>): Add.
* lisp/progmodes/grep.el (rgrep-default-command): Check
rgrep-find-ignores-in-<f> and move the excluded files glob to part of
the "files" argument.  (Bug#71179)
2024-06-02 12:43:09 +02:00
..
antlr-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
asm-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
autoconf.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
bat-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
bug-reference.el ; Fix previous fix for bug#70796 2024-05-24 23:04:33 +02:00
c-ts-common.el Make comment-indent-new-line conform better to CC Mode (bug#71225) 2024-06-02 10:08:05 +02:00
c-ts-mode.el Fontify namespace in constant face in c++-ts-mode (bug#71070) 2024-05-21 23:01:33 -07:00
cc-align.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-awk.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-bytecomp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cc-cmds.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-defs.el Revert "Suppress docstring control char warning in macro-generated function" 2024-03-07 14:29:36 +01:00
cc-engine.el Run c-unmark-<>-around-region in after-change-functions always. 2024-05-05 11:34:14 +00:00
cc-fonts.el ; Fix typos in symbol names 2024-01-21 15:28:06 +01:00
cc-guess.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cc-langs.el CC Mode: Handle C++20's if consteval 2024-03-26 20:59:43 +00:00
cc-menus.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cc-mode.el In normal-mode, make c-mode call c-mode when CC Mode is loaded 2024-05-30 12:40:07 +00:00
cc-styles.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-vars.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cfengine.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cl-font-lock.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cmacexp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cmake-ts-mode.el Add non-TS modes as extra parent of TS modes (bug#68246) 2024-03-09 10:29:06 -05:00
compile.el Add support for Rust compilation messages 2024-05-18 13:51:01 +03:00
cperl-mode.el ; cperl-mode.el: prevent Emacs from "freezing" (Bug#70948) 2024-05-16 22:22:37 +02:00
cpp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
csharp-mode.el Merge from origin/emacs-29 2024-04-27 06:23:46 -04:00
cwarn.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
dcl-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
dockerfile-ts-mode.el Add non-TS modes as extra parent of TS modes (bug#68246) 2024-03-09 10:29:06 -05:00
ebnf-abn.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-bnf.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-dtd.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-ebx.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-iso.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-otz.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-yac.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf2ps.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebrowse.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
eglot.el Eglot: run eglot-managed-mode-hook when turning off (bug#70958) 2024-05-27 16:58:55 -05:00
elisp-mode.el Fix printing the result by 'eval-print-last-sexp' 2024-05-18 12:55:34 +03:00
elixir-ts-mode.el Add non-TS modes as extra parent of TS modes (bug#68246) 2024-03-09 10:29:06 -05:00
erts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
etags-regen.el etags-regen-program: Use more robust default value 2024-05-22 02:51:51 +03:00
etags.el Fix case-sensitivity in 'complete-tag' 2024-03-09 10:09:36 +02:00
executable.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
f90.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
flymake-cc.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
flymake-proc.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
flymake.el Fix bug#70711 2024-05-03 09:16:39 +03:00
fortran.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
gdb-mi.el Merge from origin/emacs-29 2024-03-02 03:43:14 -05:00
glasses.el With glasses-uncapitalize-p, use a display overlay property 2024-04-20 11:30:13 +03:00
go-ts-mode.el go-ts-mode: Highlight variadic function parameter names 2024-06-01 17:47:57 +03:00
grep.el In rgrep, check matching files before excluding files 2024-06-02 12:43:09 +02:00
gud.el Fix LLDB frame-format for optional column number info 2024-06-01 21:05:50 +02:00
heex-ts-mode.el Add non-TS modes as extra parent of TS modes (bug#68246) 2024-03-09 10:29:06 -05:00
hideif.el hideif.el: Minor cleanup 2024-02-13 20:35:05 -05:00
hideshow.el Simplify mode-indexed tables in packages 2024-03-09 10:29:32 -05:00
icon.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
idlw-complete-structtag.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
idlw-help.el ; Simplify (with-current-buffer (get-buffer ...) ...) 2024-03-14 12:40:26 +02:00
idlw-shell.el Pacify some docstring control char warnings 2024-02-28 17:04:20 +01:00
idlw-toolbar.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
idlwave.el doc: Delete extraneous quotes around keys 2024-01-21 14:09:34 +01:00
inf-lisp.el Suppress warnings for obsolete display-comint-buffer-action (bug#69983) 2024-04-25 20:34:28 +03:00
java-ts-mode.el Add non-TS modes as extra parent of TS modes (bug#68246) 2024-03-09 10:29:06 -05:00
js.el Limit matches of treesit-thing-settings in js-ts-mode (bug#71244) 2024-05-31 09:34:28 +03:00
json-ts-mode.el Add non-TS modes as extra parent of TS modes (bug#68246) 2024-03-09 10:29:06 -05:00
ld-script.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
lua-ts-mode.el ; Fix byte-compilation warnings in lua-ts-mode.el 2024-05-11 13:54:35 +03:00
m4-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
make-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
meta-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
mixal-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
modula2.el modula2.el: Avoid font-lock-*-face variables 2024-02-09 14:22:14 -05:00
octave.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
opascal.el (pcase): New _ syntax in pred/app functions 2024-02-11 22:00:44 -05:00
pascal.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
peg.el ; Improvements to PEG documentation (second attempt) 2024-04-16 17:26:47 -07:00
perl-mode.el ; Minor copy edits 2024-04-09 22:40:43 +03:00
prog-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
project.el Provide a list of default values for M-n of project-find-file (bug#70996) 2024-05-28 19:31:55 +03:00
prolog.el doc: Delete extraneous quotes around keys 2024-01-21 14:09:34 +01:00
ps-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
python.el Enhance 'python-shell-send-block' for convenience 2024-05-26 11:23:12 +03:00
ruby-mode.el ruby-rubocop-use-bundler: New user option 2024-05-13 05:37:05 +03:00
ruby-ts-mode.el * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add 'text' (bug#67036). 2024-05-02 09:28:53 +03:00
rust-ts-mode.el Tighten regexp for rust-ts-mode keyword workaround 2024-05-01 21:50:21 -07:00
scheme.el (scheme-syntax-propertize-sexp-comment): Allow #; in strings 2024-04-01 10:46:19 -04:00
sh-script.el Suppress warnings for obsolete display-comint-buffer-action (bug#69983) 2024-04-25 20:34:28 +03:00
simula.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
sql.el Fix sending input to SQL when point is not at EOB 2024-04-18 11:53:26 +03:00
subword.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
tcl.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
typescript-ts-mode.el Merge from origin/emacs-29 2024-03-30 04:38:18 -04:00
vera-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
verilog-mode.el ; Simplify (with-current-buffer (get-buffer ...) ...) 2024-03-14 12:40:26 +02:00
vhdl-mode.el vhdl-mode.el: Reduce use of eval 2024-02-27 08:24:45 -05:00
which-func.el ; Fix thinko in my last change 2024-05-27 22:39:03 +02:00
xref.el * lisp/progmodes/xref.el: Bump the version to 1.7.0 2024-05-27 01:22:27 +03:00
xscheme.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00