Parallelize read-posts with pmap

This makes each markup implementation process posts in parallel.

In case of a simple test blog with 4 markdown pages mean compilation
time was reduced from 395 to 330ms. In the experiment I used OpenJDK 8
running `lein ring server` on a 4 core CPU.
master
Jan Stępień 9 years ago
parent e6ee1012d8
commit 2a95e477de

@ -122,7 +122,7 @@
(fn [mu]
(->>
(find-posts config mu)
(map #(parse-post % config mu))))
(pmap #(parse-post % config mu))))
(m/markups))
(sort-by :date)
reverse))

Loading…
Cancel
Save