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.
This commit is contained in:
parent
c2d1d4e16e
commit
ace02f41b0
7 changed files with 149 additions and 66 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue