Plexus Components
  1. Plexus Components
  2. PLXCOMP-202

[PATCH] Huge performance improvement in JavacCompiler by caching the JavaC class

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: plexus-compiler-1.8.2
    • Fix Version/s: plexus-compiler-1.8.6
    • Component/s: plexus-compiler
    • Labels:
      None
    • Environment:
      Plexus trunk
    • Number of attachments :
      1

      Description

      In the current version of org.codehaus.plexus.compiler.javac.JavacCompiler, for each compilation task a new classloader is being created to load JavaC.
      This slows down the build process.

      With the attached patch JavacCompiler will cache the classloader. For me this reduces the build time to 1/3 when compiling multiple projects.

        Activity

        Hide
        Jörg Waßmer added a comment -

        This also solves "OutOfPermSpace" problems when running huge builds via the Maven reactor.

        Show
        Jörg Waßmer added a comment - This also solves "OutOfPermSpace" problems when running huge builds via the Maven reactor.
        Hide
        Olivier Lamy added a comment -

        good catch !
        I'm doing some testing and looks very good!

        Show
        Olivier Lamy added a comment - good catch ! I'm doing some testing and looks very good!
        Show
        Olivier Lamy added a comment - pushed https://github.com/sonatype/plexus-compiler/commit/b6ac771d6deb2ada47f24d9873e8a7d381c5f8de Thanks !

          People

          • Assignee:
            Olivier Lamy
            Reporter:
            Jörg Waßmer
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: