ClojureScript

Add some compiler stats around node module indexing

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:
    Code

Description

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.

Activity

Hide
Mike Fikes added a comment -

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=>
Show
Mike Fikes added a comment - 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=>

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: