sbt/util
Jason Zaugg 5005abfef2 SD-232 Recycle classloaders to be anti-hostile to JIT.
The compiler interface subclasses `scala.tools.nsc.Global`,
and loading this new subclass before each `compile` task forces
HotSpot JIT to deoptimize larges swathes of compiled code. It's
a bit like SBT has rigged the dice to always descend the longest
ladder in a game of Snakes and Ladders.

The slowdown seems to be larger with Scala 2.12. There are a number
of variables at play, but I think the main factor here is that
we now rely on JIT to devirtualize calls to final methods in traits
whereas we used to emit static calls. JIT does a good job at this,
so long as classloading doesn't undo that good work.

This commit extends the existing `ClassLoaderCache` to encompass
the classloader that includes the compiler interface JAR. I've
resorted to adding a var to `AnalyzingCompiler` to inject the
dependency to get the cache to the spot I need it without binary
incompatible changes to the intervening method signatures.
2016-09-26 14:49:47 +10:00
..
appmacro/src/main/scala/sbt/appmacro Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
classfile Add a test that we`re able to parse inner classes. 2015-11-10 14:45:04 -08:00
classpath SD-232 Recycle classloaders to be anti-hostile to JIT. 2016-09-26 14:49:47 +10:00
collection Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
complete Fixes #2480. Workaround for Jline regression (#2570) 2016-04-23 23:56:25 -04:00
control added scalariform 2014-05-01 12:50:07 -04:00
cross/src/main/input_sources Allow the "-bin" Scala version suffix to specify a bincompat version 2014-09-04 01:15:58 +02:00
datatype Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
io Reimplement fallback to system classloader to maintain the 0.13 semantics 2015-12-30 07:36:12 -05:00
log Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
logic/src Fix additional warnings 2015-08-07 00:23:14 +02:00
process Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
relation/src Simplify operations on collections 2015-08-01 02:25:17 +02:00