Hello. Does anyone know if there have been studies...
# gradle
l
Hello. Does anyone know if there have been studies regarding the build speed of a project on kts vs groovy?
g
Initial build will be slower (time required to build build script itself and download dependencies), bit later build shouldn't be slower
l
Thanks
n
you can check the amount of time that the buildscript take to compile in the build scans.
I did a talk on this in 2018:

https://www.youtube.com/watch?v=Rwrja9WCTS0

Most of the talk is on conversions, but I get in to a bit of the performance aspects toward the end
l
Thanks
k
There was a talk at kotlinconf in 2018 as well. It slows you down if you're editing Gradle files a lot because of what feels like a 10sec hit on first run.
l
Thx, I came to the conclusion that it would be advisable for me to switch to ktx
g
A lot of things changed from 2018, it a lot faster now, but still it slower than Groovy to compile
and especially on very first project init
l
I agree
but since the developers of kotlin or Android Studio are advancing this approach, I will also use it until I notice critically serious impairments in build speed
c
It's times slower, and if you have hundreds of modules that's very noticeable (if you change something it needs to recompile all the scripts and may take minutes...)
Luckily configuration cache is coming, and it means that, unless you change a build script, once cached, it will take 0 seconds to compile them, or to run the configuration
(and a small "secret" it uses absolute paths, but if your CI always use the same absolute path for the build you can reuse it from another build)
n
build scripts are already cached
t
problem is that a build script classpath change forces a rebuild no?
g
yes, but changing build.gradle doesnt change build classpath of all modules and doesn’t forces full rebuild of the project