cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
Niclas 2020-04-22T15:07:23.197600Z

I’m using lein-cljsbuild in a large project and compilation times are becoming noticeably long, do you guys have any good guides on compilator speedup techniques?

dnolen 2020-04-22T15:35:39.198200Z

@looveh need more details - dev builds, advanced builds?

Niclas 2020-04-22T15:38:30.198900Z

@dnolen This would be the config passed to cljsbuild

{:builds [{:id             "dev"
           :figwheel       true
           :source-paths   ["src"]
           :compiler       {:output-to "app/target/dev/index.js"
           :main           "env.main"
           :parallel-build true
           :output-dir     "app/target/dev"
           :optimizations  :none}}]}

dnolen 2020-04-22T15:39:12.199500Z

@looveh are you blowing away the target directory every time?

dnolen 2020-04-22T15:39:22.199800Z

nothing is going to get faster if everything must be recompiled

Niclas 2020-04-22T15:39:55.200300Z

I would assume figwheel doesn’t since compile times may vary depending on which file is being edited

dnolen 2020-04-22T15:43:56.200900Z

@looveh if you only change one file that it should not take a long time to recompile

dnolen 2020-04-22T15:44:12.201300Z

you can add :verbose true to see what's going on

Niclas 2020-04-22T15:47:05.203400Z

@dnolen Thanks, I’ll check that out. Not sure if it’s figwheel that’s recompiling all the children in the dependency tree of the file I’m editing, unless I’m editing any macros it should only be the single file that would need recompiling if I’m thinking right about this?

dnolen 2020-04-22T15:47:59.203800Z

it's not generally safe to not recompile dependents

dnolen 2020-04-22T15:48:13.204200Z

you will lose warnings - but if you're feeling brave you can control this

Niclas 2020-04-22T15:48:56.204800Z

@dnolen Awesome, thanks. Feeling brave today