doc: add note about --pre-glob

There was a performance warning in the --pre docs, but didn't mention
--pre-glob as a possible mitigation to it.
This commit is contained in:
Andrew Gallant 2019-04-15 10:27:28 -04:00
parent e79085e9e4
commit 3fe701498e
No known key found for this signature in database
GPG Key ID: B2E3A4923F8B0D44

View File

@ -2019,7 +2019,8 @@ or the '--no-pre' flag will disable this behavior.
WARNING: When this flag is set, ripgrep will unconditionally spawn a WARNING: When this flag is set, ripgrep will unconditionally spawn a
process for every file that is searched. Therefore, this can incur an process for every file that is searched. Therefore, this can incur an
unnecessarily large performance penalty if you don't otherwise need the unnecessarily large performance penalty if you don't otherwise need the
flexibility offered by this flag. flexibility offered by this flag. One possible mitigation to this is to use
the '--pre-glob' flag to limit which files a preprocessor is run with.
A preprocessor is not run when ripgrep is searching stdin. A preprocessor is not run when ripgrep is searching stdin.