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

Slow compilation with long classpaths under JDK 9

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b156
    • Verification:
      Not verified

      Backports

        Description

        Compilations with long classpaths and many references to symbols in the classpath cause javac to make many calls to Files.exist, and for the cache in ArchiveContainer to retain a large number of entries.

        see: http://mail.openjdk.java.net/pipermail/compiler-dev/2016-December/010596.html

        Repro:

        1) generate the test inputs

        $ javac -cp asm.jar Test.java && java -cp asm.jar:. Test

        2) compile

        $ $JAVAC8 -fullversion
        javac full version "1.8.0_122-ea-b04"
        $ time $JAVAC8 @params.txt
        real 0m17.385s
        user 0m40.855s
        sys 0m1.305s

        $ $JAVAC9 -fullversion
        javac full version "9-ea+148"
        $ time $JAVAC9 @params.txt
        real 8m40.530s
        user 32m8.614s
        sys 0m57.024s

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jlahoda Jan Lahoda
                  Reporter:
                  cushon Liam Miller-Cushon
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved: