Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8011386

Slow down in compilation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8
    • tools

      Recent versions of JDK8 javac appear to compile slower than javac from JDK7, even when using -source 7 -target 7 and running on JDK7.

      For example, we have measured time needed to compile JDK8 langtools sources using command like this:
      ${JDK7_HOME}/bin/java -Xbootclasspath:${LAMBDA_HOME}/lib/classes.jar:${JDK7_HOME}/jre/lib/rt.jar -cp ${LAMBDA_HOME}/lib/classes.jar com.sun.tools.javac.Main -source 1.7 -target 1.7 -d build -classpath build -sourcepath src -bootclasspath ${JDK7_HOME}/jre/lib/rt.jar @files

      The average times from 10 measurements were:
      JDK 7 javac: 17.4s
      JDK 8 javac: 22.7s
      lambda: 23.0s

      Versions used:
      JDK7:
      $javac -version
      javac 1.7.0_15

      JDK8 - langtools tip: d3648557391b
      Lambda - langtools tip: f55c889a51a5

            mtrudeau Michel Trudeau
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: