kotlin-dsl-samples
kotlin-dsl-samples copied to clipboard
Optimize Kotlin compiler context reuse
The main bottleneck on first use of a multi-project build involving hundreds of projects is Kotlin compilation time.
The following tasks can be executed from a Gradle checkout to analyse the Kotlin compilation behaviour:
$ ./gradlew ktsManyProjects
...
Generating test project 'project99' into .../gradle/subprojects/performance/build/ktsManyProjects/project99
$ cd subprojects/performance/build/ktsManyProjects
$ ../../../../gradlew tasks --recompile-scripts
...
BUILD SUCCESSFUL
Total time: 37.239 secs
Hey @ligee, I'm assigning this one to you because of the conversation we had some time ago:
we’re trying to keep the context ourselves, so this is a good opportunity to see whether we are doing it correctly. I think we should start from analyzing the log.
Please let me know if you need changes to the code generation scripts.