summaryrefslogtreecommitdiff
path: root/src/Index.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2026-08-02 20:56:48 +0200
committerTom Smeding <tom@tomsmeding.com>2026-08-02 20:56:48 +0200
commit5c241aa67a927a1b1755c6691821421b742b141a (patch)
treeda8d0d1683bbd5207003aa475b4784ed8254b516 /src/Index.hs
parent2116bd0d411ebd93a1fb35c04a5eaf0d6e840fd7 (diff)
Some optimisation of indexing
Diffstat (limited to 'src/Index.hs')
-rw-r--r--src/Index.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Index.hs b/src/Index.hs
index b82d095..81eb5f2 100644
--- a/src/Index.hs
+++ b/src/Index.hs
@@ -158,9 +158,9 @@ initIndex basedir toimport = do
Just ymd -> ymdToGregorian ymd
Nothing -> error $ "Log file with unexpected file name: " ++ path
-- atomicPrintS $ "Parsing " ++ path ++ " (" ++ show date ++ " -> " ++ show (dateToDay date) ++ ")"
- events <- parseLog <$> BS.readFile path
- let !nevents = length events
- !ccpr = countCompressed (map snd events)
+ rawEvents <- parseLogRaw <$> BS.readFile path
+ let !nevents = rawNumEvents rawEvents
+ !ccpr = countCompressed (map snd (realiseEvents rawEvents))
return (uncurry3 fromGregorian date, nevents, ccpr)
let minday = minimum [day | (day, _, _) <- days]
maxday = maximum [day | (day, _, _) <- days]