Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

We've optimized Node module indexing in the past, but it would be nice to have a little output covering these expensive steps in the case that {{:compiler-stats}} is enabled.

2 Answers

0 votes
by
_Comment made by: mfikes_

One interesting outcome of this feature is that you can see that we might be re-indexing more than expected:


$ npm install source-map-support
...
$ clj -m cljs.main -co '{:compiler-stats true :npm-deps true}' -re node -r
ClojureScript 1.10.440
cljs.user=> Index Node modules dir, elapsed time: 32.643801 msecs
Index Node modules dir, elapsed time: 1.570911 msecs
Index Node modules dir, elapsed time: 1.521448 msecs

cljs.user=> ^D

$ clj -m cljs.main -co '{:compiler-stats true}' -re browser -r
Index Node modules, elapsed time: 0.035479 msecs
Compile sources, elapsed time: 4636.822735 msecs
Compile sources, elapsed time: 77.468702 msecs
Index Node modules, elapsed time: 0.015983 msecs
Index Node modules, elapsed time: 0.010176 msecs
Index Node modules, elapsed time: 0.009045 msecs
Index Node modules, elapsed time: 0.010003 msecs
Index Node modules, elapsed time: 0.008422 msecs
ClojureScript 1.10.440
cljs.user=>
0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2963 (reported by mfikes)
...