As the size of my codebase keeps expanding (currently around 120K LOC, split between CLJ/CLJC/CLJS files), the compilation time keeps expanding as well. Particularly in CLJS — but also when refreshing all namespaces in a CLJ REPL — I frequently have to wait up to 20 secs. We are obviously spoiled as compared to other languages, but still I find this breaks my development rhythm.
Do any of you have interesting suggestions to truly optimize the compilation speed? My development machine is an 8-core iMac Pro, and I use OpenJDK 8, Cursive, Leiningen & ShadowCLJS. For various reasons, I must use OSX as my main environment.
I wonder whether any of the following would be good ideas:
Compile & REPL on a more powerful (e.g., ThreadRipper) Linux box. Anyone has benchmarking data for CLJ/CLJS projects on how additional cores could make a difference? I am somewhat hesitant, because of the overhead of using an additional machine. Also, if I understand correctly, IntelliJ doesn’t like having its working files stored on a networked folder.
Experimenting with another JDK and/or with the JVM-settings, whether or not on OSX. Anyone have experience with Azul or own compilation like http://august.nagro.us/optimized-openjdk.html?
By the way, is there a reason why CLJ-compilation seems single-threaded? Kind of ironic for a language focused on multi-threading, and given that CLJS-compilation is partially multi-threaded…