My favorites | Sign in
Google
                
New issue | Search
for
| Advanced search | Search tips
Issue 610: PATCHES: Two compiler optimizations
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  scottb@google.com
Closed:  May 2007
Type-Enhancement
Priority-Critical
Milestone-1_4_RC
Category-Compiler


Sign in to add a comment
 
Reported by alex.tka...@gmail.com, Jan 18, 2007
GWT Release:

1.3.1

Detailed description:

There are three obfuscation optimization, which all together saves 14K for
KitchenSink application and 12K for Mail.

1) Introducing one-letter names for parameters and local vars
2) Replacing duplicated string literals by constants
3) Replacing fully-qualified class names by <packageNameLiteral> +
<classNameLiteral>

Workaround if you have one:

Patch and one new class are attached.

Links to the relevant GWT Developer Forum posts:

http://groups-beta.google.com/group/Google-Web-Toolkit-Contributors/browse_frm/thread/bea6070061455fab
Obfuscation_optimization.patch
11.4 KB Download
JsStringLiteralOrNameRef.java
680 bytes Download
Comment 1 by gwt.team.scottb, Jan 18, 2007
(No comment was entered for this change.)
Summary: PATCHES: Two compiler optimizations
Comment 2 by gwt.team.scottb, Jan 18, 2007
(No comment was entered for this change.)
Status: Accepted
Owner: gwt.team.scottb
Labels: -Type-Defect Type-Enhancement
Comment 3 by gwt.team.scottb, Jan 19, 2007
(No comment was entered for this change.)
Labels: Milestone-1_4_RC
Comment 4 by gwt.team.scottb, Feb 02, 2007
Hi Alex,

These optimizations really save a lot!  That being said, I had a number of problems
with this patch from a purely logistical standpoint.

First, the patch file should have been created from inside of trunk/ rather than
outside of trunk.  Second, I'm not sure what version of svn you're using, but I had
to hand-edit the patch file to a different format to get it to accept the patch file.
 Third, none of the code appears to follow the GWT style guidelines outlined in
Making GWT Better.  Finally, I think item #1 should have been split into a separate
patch from items #2 and #3.

Without making any functional changes, I am attaching two new patch files that comply
with the above.  I'll address the actual content in a follow up.

param-local--obfuscation-optimization-r351.patch
1.7 KB Download
merge-string-constants-r351.patch
9.3 KB Download
Comment 5 by gwt.team.scottb, Feb 02, 2007
(No comment was entered for this change.)
Status: Started
Comment 6 by gwt.team.morrildl, Feb 12, 2007
Pri-Crit as a blocker for 1.4.
Labels: -Priority-Medium Priority-Critical
Comment 7 by gwt.team.bruce, Feb 14, 2007
(No comment was entered for this change.)
Labels: Category-Compiler
Comment 8 by gwt.team.scottb, Feb 22, 2007
A massive change (refactor) based on the ideas in the obfuscation patch is currently
submitted for review.

http://google-web-toolkit.googlecode.com/svn/changes/scottb/jsname-refactor-r430/

Comment 9 by gwt.team.scottb, Feb 26, 2007
The obfuscation change was committed as r482.

A specific change to merge package names is in progress.  A general change for
merging string literals will not be considered for this release.  Please enter a
separate issue for that, as this one will be closed out.

Comment 10 by gwt.team.scottb, Feb 27, 2007
The package name optimization was committed as r491.  I'm marking this bug as Fixed
given that we're not doing string merging globally right now.  If you think this is
still important, please enter another issue.  Thanks!  These optimizations have
REALLY saved a TON of code size!  Keep up the good ideas.

Status: FixedNotReleased
Comment 11 by gwt.team.bruce, May 29, 2007
Changing to Fixed status with GWT 1.4 RC release
Status: Fixed
Comment 12 by sumitcha...@google.com, Apr 28, 2008
 
Owner: scottb
Sign in to add a comment