nedap / formatting-stack

An efficient, smart, graceful composition of Clojure formatters, linters and such.
Eclipse Public License 2.0
99 stars 2 forks source link

Parallelize `formatting-stack.strategies/namespaces-within-refresh-dirs-only` #168

Closed vemv closed 3 years ago

vemv commented 3 years ago

Problem statement

formatting-stack.strategies/namespaces-within-refresh-dirs-only is file-heavy and therefore slow. It can increase the cost of (files-from-strategies strategies) for whole-project analysis from 20s to 60s.

Proposal

Parallelize it - it's easy: xs ->> (filter ...) -> xs ->> (partitioning-pmap ...) (filter identity)

Alternatives and comparison