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?
@looveh need more details - dev builds, advanced builds?
@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}}]}
@looveh are you blowing away the target directory every time?
nothing is going to get faster if everything must be recompiled
I would assume figwheel doesn’t since compile times may vary depending on which file is being edited
@looveh if you only change one file that it should not take a long time to recompile
you can add :verbose true
to see what's going on
@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?
it's not generally safe to not recompile dependents
you will lose warnings - but if you're feeling brave you can control this
@looveh https://clojurescript.org/reference/compiler-options#recompile-dependents
@dnolen Awesome, thanks. Feeling brave today