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.
This commit is contained in:
parent
e6ee1012d8
commit
2a95e477de
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue