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

Memory tweaks for groovy compiler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1.4, 2.2.0-beta-1
    • Compiler
    • None

    Description

      I've been doing some profiling of Groovy-Eclipse and I found a few things you should be aware of in the Groovy compiler:

      1. org.codehaus.groovy.classgen.asm.ClosureWriter.UseExistingReference should be a static interface. As it is now, every reference to UseExistingReference.class will have a back pointer to an instance of ClosureWritier. Making the interface static will avoid that back reference.
      2. The org.codehaus.groovy.ast.ASTNode.metaDataMap field should be lazily initiailzed. And when it is initialized, it should be done with a smaller initial size. This field is taking up massive amounts of space in my profile and it is mostly and empty field.

      These two changes would cause massive memory savings in Groovy-Eclipse. We have already implemeted #2 and have seen a big benefit.

      Attachments

        Activity

          People

            melix Cédric Champeau
            werdna Andrew Eisenberg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: