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

groovyall.jar is too heavy, can we reduce it?

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      I like groovy but the groovy-all*.jar is too big. sth should do now.
      there are so many source code is for java1.4, we can rewrite them in java 1.5 to make groovy slim.
      for example:
      src/main/org/codehaus/groovy/runtime/ArrayUtil.java (ArrayUtil.class 1,093,546B)
      src/main/org/codehaus/groovy/reflection/MethodHandle.java
      src/main/org/codehaus/groovy/runtime/callsite/AbstractCallSite.java
      we can reduce ArrayUtil.class to 909B!!! if we rewrite like this:

      public class ArrayUtil {
          private static final Object[] EMPTY = new Object[0];
      
          public static Object[] createArray() {
              return EMPTY;
          }
      
          public static Object[] createArray(Object... args) {
              return args;
          }
      }
      

      1,759 KB groovy-all-1.0-JSR-06.jar
      2,238 KB groovy-all-1.0.jar
      2,762 KB groovy-all-1.5.4.jar
      2,775 KB groovy-all-1.5.5.jar
      2,784 KB groovy-all-1.5.6.jar
      4,536 KB groovy-all-1.6.3.jar
      4,399 KB groovy-all-1.6.4.jar
      4,448 KB groovy-all-1.6.7.jar
      4,054 KB groovy-all-1.6.jar
      4,922 KB groovy-all-1.7-beta-2.jar
      5,119 KB groovy-all-1.7.1.jar
      5,165 KB groovy-all-1.7.2.jar

      Attachments

        1. arrytest.zip
          1 kB
          lwh

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              wonder365 lwh
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: