avoid reposize database locking overhead when not needed
Only when the preferred content expression being matched uses balanced preferred content is this overhead needed. It might be possible to eliminate the locking entirely. Eg, check the live changes before and after the action and re-run if they are not stable. For now, this is good enough, it avoids existing preferred content getting slow. If balanced preferred content turns out to be too slow to check, that could be tried later.
This commit is contained in:
parent
09955deebe
commit
e006acef22
6 changed files with 43 additions and 12 deletions
|
@ -40,12 +40,14 @@ addPreferredContentLimit desc a = do
|
|||
nfc <- introspectPreferredRequiredContent matchNeedsFileContent Nothing
|
||||
nk <- introspectPreferredRequiredContent matchNeedsKey Nothing
|
||||
nl <- introspectPreferredRequiredContent matchNeedsLocationLog Nothing
|
||||
lsz <- introspectPreferredRequiredContent matchNeedsLiveRepoSize Nothing
|
||||
addLimit $ Right $ MatchFiles
|
||||
{ matchAction = const $ const a
|
||||
, matchNeedsFileName = nfn
|
||||
, matchNeedsFileContent = nfc
|
||||
, matchNeedsKey = nk
|
||||
, matchNeedsLocationLog = nl
|
||||
, matchNeedsLiveRepoSize = lsz
|
||||
, matchDesc = matchDescSimple desc
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue