Interesting, in my experience long compile times in Scala equates with a bad code base. And invariably involves an uber object with a whole lot of implicit conversations and is imported on every other source file.
I think the pertinent part of the comment you're replying to was graalvm, not so much Scala. I was compiling a small Scala codebase that took 15 minutes to compile - most of that was not my code, it analyses the reachability of the entire classpath and compiles it to native machine code.
I don’t know about bad code but a lot of derivations that send compiler into proof loops usually is what is causing slowdowns. You can write the same code by hand, pick your poison. Honestly, scalac is probably still faster than typescript compiler and somehow no one complaining about ts