https://kotlinlang.org logo
Title
g

groostav

07/11/2019, 6:12 PM
If I was to buy a new computer and I wanted the fastest possible compile times (specifically intelliJ/kotlin, though I do ofc have many other toolchains), what should be my focus point?
I feel like jetbrains should make a kotlin benchmarking suite. A nicely packaged script that pulls ktor, indexes it, builds it, runs its tests, maybe runs some benchmarks would be neat if we could get anantech et al to run it. If they did, Id be an anantech reader again
I wonder if I can wrap all this into a little exe4j/install4j package...
s

serebit

07/11/2019, 6:17 PM
More cores/threads, as compile times scale pretty well with number of logical processors
k

karelpeeters

07/11/2019, 6:18 PM
Definitely get an SSD, the intelij loading times and everything in general goes way faster.
4
g

groostav

07/11/2019, 6:19 PM
yeah @karelpeeters that was my first thought, but I worked for a company that invested a massive amount of money in SSDs for their build servers years ago, and build times dropped by a couple percentage points. Management wasn't happy.
@serebit is that true of kotlinc-wrapping-java? Is there a jetbrains blog about this?
k

karelpeeters

07/11/2019, 6:20 PM
I don't know about build servers but for a standard desktop the difference is incredible.
g

groostav

07/11/2019, 6:22 PM
Think a crosspoint optane drive (read: stupidly expensive SSD) over a more standard SSD is worth it if the only thing you used this machine for was building big old java/kotlin projects in intelliJ?
s

serebit

07/11/2019, 6:24 PM
I haven't tested kotlinc-wrapping-java specifically, but it's a generally accepted rule of thumb that compile times improve drastically with number of cores.
k

karelpeeters

07/11/2019, 6:24 PM
Get something in the middle: an NVMe SSD. I haven't tried an optane drive yet 😒imple_smile:
s

serebit

07/11/2019, 6:25 PM
It depends on the specific workload, of course, but in my personal experience (I upgraded from an i5-6400 with 4c4t to a R7 3700X with 8c16t) Gradle compile times have more than halved with my new CPU
Don't get NVMe if you're only doing compile workloads. It's not worth the premium
And compilation doesn't hit storage nearly as much as cache, so an SSD won't improve compile times nearly as much as a better CPU
🤔 1
It'll improve IntelliJ startup time, sure, but it's not going to do much for compilation
k

karelpeeters

07/11/2019, 6:27 PM
And the indexing every time you do something with git.
s

serebit

07/11/2019, 6:28 PM
geoff asked about compile times, so that's what I'm addressing
g

groostav

07/11/2019, 6:28 PM
right, I think thats the thing, if intellij and/or gradle gets to be clever with incremental compilation, your IO limited, if you drop a big ol' "compile all this code" on your computer, you're CPU bound.
s

serebit

07/11/2019, 6:29 PM
yep. So I'd look for a CPU with SMT, maybe 16 threads and 8 cores, and a large cache
So basically what I bought, haha
1
k

karelpeeters

07/11/2019, 6:29 PM
It's strange that I can't find any information whether the kotlin compiler is multithreaded at all.
m

mathew murphy

07/11/2019, 8:33 PM
Also plenty of RAM obviously.
Make sure you can fit IDEA and the compiler into RAM and have plenty of space left for cache.
m

Mike

07/11/2019, 10:38 PM
@groostav likely didn't see an impr9on build server for ssd as most things would get loaded in memory and stay there. So disk not doing much. For your machine, you'll have various apps running, start and stop them, and open various files. Ssd will make a difference. And nowadays, unless you really go out of your way, you're getting an ssd. But as others have said, they're are levels of ssds too.