Profile Scala3 compiler

93 views Asked by At

We have one Scala3 project where we use macros. We use Visual Studio Code with Metals plugin.

sbt clean compile

tooks more then 20 minutes. Is there any way to profile Scala3 compiler to figure out where that time goes?

1

There are 1 answers

0
gun On

You can set the compilerflag "-Vprofile" in your build.sbt.

scalacOptions += "-Vprofile"

It will output the complexity of your files. At least, it will give you a hint, where a lot of compile time will be spend.

Maybe this will be interesting for you as well: Scala Sbt - Measure task time for subprojects