aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/History.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/History.hs b/app/History.hs
index 3ac8a8e..ed07bcd 100644
--- a/app/History.hs
+++ b/app/History.hs
@@ -4,6 +4,7 @@ module History
)
where
+import Parallel (parMapM, parSequence)
import CMark qualified as D
import Cache (cachedMaybe)
import Comment qualified as G
@@ -106,7 +107,7 @@ getIssuesAndFilesChanged commitHash = do
issues <-
concat
<$> catch
- (mapM (getIssues commitHash) files)
+ (parMapM (getIssues commitHash) files)
(\(e :: E.InvalidTreeGrepperResult) -> die (show e))
pure (issues, files)
@@ -114,7 +115,7 @@ getIssuesAndFilesChanged commitHash = do
getIssues :: CommitHash -> FilePath -> IO [I.Issue]
getIssues commitHash filename =
handle (\(_ :: E.UnknownFileExtension) -> pure []) $
- fmap catMaybes . mapM (fromComment commitHash)
+ fmap catMaybes . parMapM (fromComment commitHash)
=<< G.getComments commitHash filename
-- | Note that `provenance` is trivial and needs to be fixed up later.
@@ -187,7 +188,7 @@ propagateIssueEvents oldIssueEvents oldIssues commitHash issues =
newIssueEvents :: M.Map T.Text I.Issue -> CommitHash -> M.Map T.Text I.Issue -> IO [IssueEvent]
newIssueEvents oldIssues' commitHash issues' =
- sequence $
+ parSequence $
concat
[ [ IssueCreated commitHash issue <$> patchCreated issue
| issue <- M.elems (issues `M.difference` oldIssues)