How should I interpret <https://blog.jetbrains.com...
# intellij
r
How should I interpret https://blog.jetbrains.com/kotlin/2020/09/the-dark-secrets-of-fast-compilation-for-kotlin/ for structuring projects today? Split it into more modules? Use gradle or intelliJ internal compiler for compilation? What are some concrete tips today? I’ve set up a gradle remote build cache and use
org.gradle.caching=true
org.gradle.parallel=true
and
org.gradle.configureondemand=true
But I am unsure what is the path forward for compilation when working inside IntelliJ, to shorten time-to-test
3
g
split into more modules will work just by nature of compilation process, but it long term solution, essentially you should arrange your architecture around it
org.gradle.configureondemand=true
Doens’t improve “compilation” time, it improves configuration time, but only in some scenarious, though, it works pretty will for our project when you test particular module
if you use gradle, I would start from getting build scan what is going on on code/test change and run
r
we’ve done everything the build scan advises
this is more on how to shorten time-to-test for day-to-day incremental compilation work inside IntelliJ when working on a not-so-huge project (24KLOC counted with ‘cloc’)
we’ve split it into four modules which work well architecture wise but we are not happy yet
we can possibly halven the codebase size by splitting it further into two different repos (this works well also architecture-wise, it’s already done on many levels)
it would be super interesting to note at which point code base size actually is a factor for time-to-test (is the dependence totally linear on code base size since it is bound by compilation or are other things going on in IntelliJ which makes even smaller projects slow)
and also there is the choice between “Build and run using IntelliJ” or “Build and run using gradle” despite using gradle for CI
so it would be good to know which of those two choices have the best path forward for performance
g
Have you measure both?