diff options
author | Joey Hess <joeyh@joeyh.name> | 2020-09-24 17:59:05 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2020-09-24 17:59:12 -0400 |
commit | ace02f41b08767bdcd329258f8a3f14e1f2b1ecf (patch) | |
tree | f521701b2979344ac421799dc1d94157ebcf7f83 /Types/FileMatcher.hs | |
parent | c2d1d4e16efb2db0facbd0c7e8b5cad820393cc5 (diff) |
seek: defer matcher check until more info is known
Sped up seeking for files to operate on, when using options like --copies
or --in, by around 20%.
Benchmark showed an increase for --copies from 155 seconds to 121
seconds, and --in remote will be similar to that.
For --in here, the speedup was less, 5-10% or so.
(both warm cache)
This commit was sponsored by Jack Hill on Patreon.
Diffstat (limited to 'Types/FileMatcher.hs')
-rw-r--r-- | Types/FileMatcher.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Types/FileMatcher.hs b/Types/FileMatcher.hs index 8a56a67ac7..5903d36f7e 100644 --- a/Types/FileMatcher.hs +++ b/Types/FileMatcher.hs @@ -62,6 +62,10 @@ data MatchFiles a = MatchFiles , matchNeedsFileContent :: Bool -- ^ does the matchAction need the file content to be present in -- order to succeed? + , matchNeedsKey :: Bool + -- ^ does the matchAction look at information about the key? + , matchNeedsLocationLog :: Bool + -- ^ does the matchAction look at the location log? } type FileMatcher a = Matcher (MatchFiles a) |