kotlin-dsl-samples icon indicating copy to clipboard operation
kotlin-dsl-samples copied to clipboard

Optimize Kotlin compiler context reuse

Open bamboo opened this issue 8 years ago • 1 comments

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

bamboo avatar Dec 15 '16 20:12 bamboo

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.

bamboo avatar Dec 15 '16 21:12 bamboo