Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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:
- 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.
- 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.