Details
-
Type:
Wish
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
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
Issue Links
- depends upon
-
GROOVY-3968
Use Pack200 for further streamlining the Groovy JARs
-
-
GROOVY-4160
Gradle build
-
-
GROOVY-1712
Source and test reorganization and Groovy core / gdk artifacts
-
- relates to
-
GROOVY-3366
reduce method variants in org.codehaus.groovy.runtime.ArrayUtil
-
This ArrayUtil class was generated in that way for some performance reasons. Sometimes there are tradeoffs.
Anyway, we're planning to change our build and make Groovy more modular, so that users can pickup just what they need.
We could also use Pack200 for better packing the JAR(s), to diminish its(/their) overal size(s).
JAR size is less of a concern nowadays, with our huge hard drives, unless perhaps you're on some mobile device, in applets/web start apps, or in embedded systems with strong space/memory constraints?