Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-10454

Performance issue with "Parrot" parser in Groovy 3.x

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.9
    • None
    • parser-antlr4
    • None
    • OpenJdk on Windows & Linux


      We have recently upgraded from Groovy 2.4.3 to Groovy 3.0.9 and are now facing a big performance issue when loading/parsing our Groovy sources.

      In one concrete example we talk about 60 Groovy source files. Loading them with Groovy 2.4.3 takes < 40 seconds, whereas loading the same sources with Groovy 3.0.9 takes twice the time (~1:20). In another example we notice increased parsing duration from ~ 1,5 minutes to 3 minutes, again a doubling of the duration.

      In the release notes I read about the new "Parrot" parser, and indeed, once I disable it via "groovy.antlr4=false" the parsing duration is "back to normal".

      That means for now we have a workaround, but as the new "Parrot" parser is going to be the one and only in Groovy 4.x we will be facing a problem in the near future ;-(

      Is this performance drop a known issue? I could not find any related tickets?

      Please note that we are loading the Groovy sources via the "groovy.lang.GroovyClassLoader" and the method call: "loadClass(path, true, false, true);"

      Looking forward to receiving feedback on that.

      Thank you very much!

      Kind regards, Rainer


        Issue Links


          This comment will be Viewable by All Users Viewable by All Users


            Unassigned Unassigned
            rpodlas Rainer Podlas




                Issue deployment