Fork me on GitHub
#cljs-dev
<
2018-08-23
>
danielcompton11:08:10

The Closure Compiler has an option to set the number of parallel threads the compiler uses (https://github.com/google/closure-compiler/blob/6c1f686b0236dccdf1b99adefd11470ca198c9a2/src/com/google/javascript/jscomp/CompilerOptions.java#L382-L393). This is only available for some passes at the moment. Would it make sense if :parallel-build is true, to also set setNumParallelThreads to a higher value? nCPU + 2 or similar?

danielcompton11:08:41

I don't have any sense of how cheap/expensive any of these parts are though

thheller11:08:23

@danielcompton I'm pretty sure the optimizations themselves don't use multiple threads. only the initial JS parsing itself. I have that enabled in shadow-cljs but it doesn't make a huge difference overall. maybe a couple ms in my completely unscientific benchmarks.

danielcompton11:08:06

yeah that was the sense I got too just looking through

mfikes18:08:17

With the WIP on https://dev.clojure.org/jira/browse/CLJS-2869, it correctly infers cljs.core/dominates as returning type boolean whereas master currently infers it as being #{clj-nil boolean}. (This could be good for checked-if elision.) 🙂

👍 8