Subject: bug#50733: 28.0.1; project-find-regexp can block Emacs for a long time

From: Daniel Martín <[email-masked]>
Date: Thu, 23 Sep 2021 23:17:14 +0200

Dmitry Gutov <[email-masked]> writes:

>
> Thanks for testing. Did the switch to ripgrep help much?
>
> I wonder if we should advertise this setting and recommendation more
> prominently, at least until we get auto-detection.
>

When I set xref-search-program to 'grep, the search is almost 10x slower.

>> Running the same search with ripgrep from the command line takes around
>> 6 seconds.
>
> Is that with an SSD?

Yes, it's a fast MacBook Pro from 2017.

>
> Another thing you can do is set up the additional ignores for the
> project. If those big binary files are not something you are
> interested in searching and touching, you could add ignore entries for
> them. When the vc project backend is in use (default), it is currently
> done via .dir-locals.el: the variable is project-vc-ignores, it's a
> list of strings that should be globs. See its docstring and the
> explanation in project-ignores's docstring.
>

I sometimes do C-u C-x p g so that I can limit the search to certain
file extensions.  That helps a little bit.

So far, the command that offers me the best performance for this kind of
project grepping is `vc-git-grep`.