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"]
:ring-handler filippos.app-server/handler
:watch-dirs ["src" "env/dev/cljs"]}
{
:output-dir "resources/public/js/out"
:output-to "resources/public/js/app.js"
:main filippos.dev
: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 [day8.re-frame-10x.preload]
}
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
?
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.
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 š)
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
I also tried the :recompile-dependents
option but it did not seem to change things
The codebase is big, but lein-figwheel with lein-cljsbuild did only take a few seconds to compile on file save.
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 š