aboutsummaryrefslogtreecommitdiffstats
path: root/app/History.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/History.hs')
-rw-r--r--app/History.hs18
1 files changed, 17 insertions, 1 deletions
diff --git a/app/History.hs b/app/History.hs
index 21709ae..5414927 100644
--- a/app/History.hs
+++ b/app/History.hs
@@ -37,6 +37,20 @@ listIssues filters paths = do
[] ->
pure []
hashFirst : hashesRest -> do
+ -- TODO Reduce cached data size
+ --
+ -- Right now we are caching complete `Issue` instances, which
+ -- contain the full issue title and description. For a fast
+ -- lookup it may already be enough to only store the issue's
+ --
+ -- * filename
+ -- * start position
+ -- * end position
+ --
+ -- With this information we can use git to quickly look up the
+ -- complete issue text and parse it.
+ --
+ -- @topic caching
issuesInitial <- cached (append hashFirst (pack ".all")) (\_ -> getIssuesCommitAll hashFirst)
commitInfos <- mapM (\hash -> cached (append hash (pack ".changed")) (\_ -> getCommitInfo hash)) hashesRest
commitInfoWorkingTree <- getCommitInfoWorkingTree paths
@@ -83,7 +97,9 @@ issueFromIssueEvent issueEvent =
Nothing
data CommitInfo = CommitInfo
- -- TODO Extact CommitInfo so we can change hash' -> hash
+ -- TODO Extract CommitInfo so we can change hash' -> hash
+ --
+ -- @topic refactoring
{ hash' :: Maybe Text,
filesChanged :: [FilePath],
issues :: [Issue]