is there a way to profile the compiler compile tas...
# compiler
is there a way to profile the compiler compile task to see what exactly takes the most time?
Gradle build scans might be helpful. Otherwise I would think you can use
and profile it (or the gradle task) like a standard JVM process, since it is one. Or perhaps attach a profiler to the daemon, you can pass JVM args like
org.gradle.jvmargs=-Xmx8g -Dkotlin.daemon.jvm.options=-Xmx6g
There is an advanced compiler option
report detailed performance statistics
Thanks, will try these out. Build scans by default just display which modules take most time, but I wanted to know what exactly in those modules is taking so long. Will use above suggestions.
You also can profile kotlin daemon. To pass jvm args to daemon you need to 1. Manually kill all daemon processes 2. Run some gradle task and pass jbm args using
3. Run all other gradle tasks without that arg (otherwise it will create new daemon for each run) Example of options for opening debug port in daemon:
./gradlew -Dkotlin.daemon.jvm.options="-agentlib:jdwp=transport=dt_socket\\,server=y\\,suspend=n\\,address=5005" <task-to-execute>