Mikko Harju 2019-09-30T14:48:26.003800Z

Hi all, any ideas why should a recompilation be slow with figwheel-main? I refactored our app that we have been using lein-figwheel for ages and it works just fine and noticed that changing a file in the project launches compilation immediately and takes ~30 seconds to finish its job that has normally been very fast. My app.cljs.edn looks like

^{:css-dirs ["resources/public/css"]
  :watch-dirs ["src" "env/dev/cljs"]}
 :output-dir      "resources/public/js/out"
 :output-to       "resources/public/js/app.js"
 :asset-path      "js/out"
 :source-map      true
 :optimizations   :none
 :pretty-print    true
 :closure-defines {"re_frame.trace.trace_enabled_QMARK_" true
                   "day8.re_frame.tracing.trace_enabled_QMARK_"  true}
 :preloads        []

ingesol 2019-10-02T07:39:16.008700Z

Hi! Iā€™m no expert here, but just throwing in debug suggestions - Remove all non-crucial config like optimizations, pretty-print, source-map, closure-defines, preloads - My experience is that reload times can vary greatly depending on the depth. Do you get different results changing your main/core cljs file vs one deep down? - Did you try :parallel-build?

Mikko Harju 2019-10-02T09:32:25.008900Z

Thanks! Others I have tried, but :parallel-build not. Currently I am benchmarking a single file that has no dependencies other than it being requireā€™d from the cljs repl.

Mikko Harju 2019-10-02T09:38:22.009100Z

I think the bulk of that slowdown is due to other things than the compilation stage so parallel build did not help much (from 30 seconds to 28 šŸ™‚)

Mikko Harju 2019-09-30T14:48:58.004500Z

I tried updating & downgrading some dependencies but that did not seem to help. I also tried figwheel-main 0.2.2 and 0.2.3 but they both work the same way

Mikko Harju 2019-09-30T14:49:23.005100Z

I also tried the :recompile-dependents option but it did not seem to change things

Mikko Harju 2019-09-30T14:52:26.006500Z

The codebase is big, but lein-figwheel with lein-cljsbuild did only take a few seconds to compile on file save.

Mikko Harju 2019-09-30T14:53:40.007800Z

I did this refactor to start spreading the namespaces to modules, but Iā€™d really like to have a baseline that just has this one thing changed before I am confident in moving forward. Any tips are greatly appreciated šŸ™‚