Hi all,
My current project takes a lot of time to compile and I tried to find
out which step of the whole compilation process takes the most.
After running scalac with -Ydebug and -Ylog:typer, I'm seeing a lot of
log entries that look like this:
[log typer] Captured This(slick.jdbc.JdbcBackend) seen from
jdbc.this.JdbcBackend: type _1.type <: jdbc.this.JdbcBackend with
scala.this.Singleton{}
[log typer] Widened lone occurrence of _1.type inside existential to
upper bound: jdbc.this.JdbcBackend
The only difference between them being the generated number name, i.e.,
the `_1.type` part.
The Slick part is not incidental, most occurrences appear for that path
— slick.jdbc.JdbcBackend — and just a few for a single other path.
Another peculiar fact is that most of the compilation process is spent
somewhere where only 1 CPU core is used. The rest of the time, more
cores are used, mostly 3 or 4.
Can anyone that's familiar with the compiler give me a hint as to when
this might happen? What kind of code patterns can lead to this?
I understand this is a pretty vague question, so if anyone is willing to
help I can provide some further details on demand, because right now I'm
not sure what else I should be looking for.
Thanks!
--
Ionuț G. Stan |
http://igstan.ro |
http://bucharestfp.ro