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

Slow javac compile times in JDK 8

    XMLWordPrintable

Details

    • b20
    • x86_64
    • windows_7
    • Not verified

    Backports

      Description

        FULL PRODUCT VERSION :
        java version "1.8.0_05"
        Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
        Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 6.1.7601]

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        Core i7 860 2.8Ghz
        12GB RAM
        C: is an 335GB SSD disk 25% of space used

        A DESCRIPTION OF THE PROBLEM :
        I compare the time javac 1.7.0_55 and javac 1.8.0_05 use to compile a .java file.
        javac 8 use 6 seconds where javac 7 uses 1.5 seconds.

        This is a problem for us since the attached test code is a tiny example of the code we generate and compile using the Compiler API while running our program, and while the user is waiting.
        We compile it because we expect it to be evaluated many times.
        We compile many thousands of this size of functions.

        REGRESSION. Last worked in version 7u55

        ADDITIONAL REGRESSION INFORMATION:
        java version "1.7.0_55"
        Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
        Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        I used this in a .bat file to time the compile process.
        --
        echo %time%

        cmd /c "C:\Program Files\Java\jdk1.7.0_55\bin\javac.exe" C:\test\TestClass.java

        echo %time%

        cmd /c "C:\Program Files\Java\jdk1.8.0_05\bin\javac.exe" C:\test\TestClass.java

        echo %time%
        --

        Summary of the result I get is:
        java7 1.5s
        java8 6s
        e.g. Javac8 is a factor of 4 slower.



        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        I expect javac 7 and 8 to be same speed for java7 source code
        ACTUAL -
        javac 7 is a factor 4 faster than javac 8

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        << attaching source file >>

        ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

                mcimadamore Maurizio Cimadamore
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: