optimisation

This commit is contained in:
Joey Hess 2023-12-29 10:51:05 -04:00
parent e7a550a25b
commit 64db927d73
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -627,10 +627,11 @@ cachedAllRepoData = do
Nothing -> do
matcher <- lift getKeyOnlyMatcher
!v <- lift $ overLocationLogs emptyKeyInfo $ \k locs d -> do
ifM (matchOnKey matcher k)
( do
numcopies <- genericLength . snd
<$> trustPartition DeadTrusted locs
ifM (matchOnKey matcher k)
( return (addKeyCopies numcopies k d)
return (addKeyCopies numcopies k d)
, return d
)
put s { allRepoData = Just v }