rorygraves / scalac_perf

The Scala programming language
http://www.scala-lang.org/
16 stars 3 forks source link

Improve performance of Run.compiles(Symbol) #31

Open mkeskells opened 6 years ago

mkeskells commented 6 years ago

we did some correctness work in https://github.com/scala/scala/pull/6181

I was surprised how often this gets called - 380,000 time in a compile of akka actor! total duration almost 100ms, but that is about 0.5% - 1% of the total compile time, depending on the cost of the logging)

It gets called lots and lots of the calls are repeated we have one package requested 276 consecutive times, and and over 1200 consecutive calls for the same symbol of 10 or more times

Maybe some of these calls can be eliminated because the calling method doesn't need to make the call, and maybe we just make this call more effective ( do we already know the answer, can we remember the answer

mkeskells commented 6 years ago

note - the merged fix is functional. This is a non functional issue