Skip to content

Commit 82b2ce7

Browse files
committed
Fix warm bootstrapped compilation speed
14cdb8e added a bunch of values to compiler.properties, one of those is `osgi.version.number` which contains a represention of the date including hours/minutes/seconds. This means that this file needs to be constantly regenerated, which causes the dotty-compiler jar to be recreated everytime we try to use it. This is very bad because sbt will not cache classloaders when the files on the corresponding classpath are modified. The result is that everytime we call `dotty-compiler-bootstrapped/compile` a new classloader is created and we do not benefit from reusing already jitted code. This commit fixes this by simply removing the osgi.version.number property: it's not used in dotty and even in Scala 2.12 it's no longer used, so this should be fine. To reproduce the issue: $ sbt > dotty-compiler-bootstrapped/compile # takes about 50s on my machine > ;dotty-compiler-bootstrapped/clean;dotty-compiler-bootstrapped/update > dotty-compiler-bootstrapped/compile # takes about 25s on my machine after this patch Before this commit, the second compile took about as long as the first.
1 parent d207e7e commit 82b2ce7

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

project/Build.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,6 @@ object Build {
430430
s"""version.number=${version.value}
431431
|maven.version.number=${version.value}
432432
|git.hash=${VersionUtil.gitHash}
433-
|osgi.version.number=${version.value}-v${dateFormat.format(Calendar.getInstance().getTime)}
434433
|copyright.string=Copyright 2002-${Calendar.getInstance().get(Calendar.YEAR)}, LAMP/EPFL
435434
""".stripMargin
436435

0 commit comments

Comments
 (0)