From 3fe701498ec249d09534e8423085dd00acf6d967 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Mon, 15 Apr 2019 10:27:28 -0400 Subject: [PATCH] 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. --- src/app.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index a4f0aa5..92f908e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -2019,7 +2019,8 @@ or the '--no-pre' flag will disable this behavior. WARNING: When this flag is set, ripgrep will unconditionally spawn a process for every file that is searched. Therefore, this can incur an 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.