From 4e4e88f1d58063f3e24195a6299f3bcdf0c304d2 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 25 Jul 2022 18:10:13 -0400 Subject: Concurrently analyze transitive dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: ϟ time bild Biz/Dragons.hs good: bild: Biz/Dragons.hs real 0m31.587s user 0m25.073s sys 0m6.446s After: ϟ time bild Biz/Dragons.hs good: bild: Biz/Dragons.hs real 0m17.111s user 0m39.719s sys 0m9.145s So yeah this is a good speedup. --- Biz/Bild.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Biz') diff --git a/Biz/Bild.hs b/Biz/Bild.hs index 58bf8e6..270508f 100644 --- a/Biz/Bild.hs +++ b/Biz/Bild.hs @@ -293,7 +293,7 @@ detectImports (Namespace _ Namespace.Hs) contentLines = do |> map (Namespace.fromHaskellModule .> Namespace.toPath) |> traverse Dir.makeAbsolute +> filterM Dir.doesFileExist - +> traverse analyze -- surely this is a bottleneck ripe for caching + +> Async.mapConcurrently analyze /> catMaybes /> map langdeps /> mconcat -- cgit v1.2.3