Tested on a small project (inspired by the sample code in issue 4893,
with methods simply doing Window.alert()s; applying the patch to GWT
2.1M1 instead of GWT-trunk), the output size was more than halved!

(means of the *.cache.html files size in bytes)
Before: PRETTY=22030.25, OBF=9971.25
After:  PRETTY=10005,    OBF=4897
Gain:   PRETTY=54.6%,    OBF=51%

And I manually verified the app still worked (in Firefox).

Actually, adding a System.out.println() in Abstractizer#setAbstract, I
saw that not only Abstract#doWork was abstractized, but also many
getClass() (Enum, Number, Scheduler, StringBufferImpl, DOMImpl,
AbstractMap, AbstractSet, GwtEvent, etc.) along with, among others,
Panel#addChild(Widget), DOMImpl#getAbsoluteLeft/Top(JavaScriptObject),
DOMImpl#get/setInnerText(JavaScriptObject,...),
AbstractMap#containsKey/Value(Object) and AbstractMap#size().


http://gwt-code-reviews.appspot.com/609801/diff/1/2
File dev/core/src/com/google/gwt/dev/jjs/ast/JClassType.java (right):

http://gwt-code-reviews.appspot.com/609801/diff/1/2#newcode55
dev/core/src/com/google/gwt/dev/jjs/ast/JClassType.java:55: @Override
Ignore this @Override annotation. I had an abstract setAbstract on
JDeclaredType in my working copy. I checked in Eclipse that it wasn't
referenced anywhere but forgot to revert it before making the patch.

http://gwt-code-reviews.appspot.com/609801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to