My favorites | Sign in
Google
Project hosting will be READ-ONLY Wednesday at 8am PST due to brief network maintenance.
                
New issue | Search
for
| Advanced search | Search tips
Issue 699: Compiler should be able to output JS files that load directly into the main page
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  scottb+legacy@google.com
Closed:  May 2007
Type-Enhancement
Priority-Medium
Category-Compiler
Milestone-1_4_RC


Sign in to add a comment
 
Reported by gwt.team.scottb, Feb 15, 2007
This is blocked on jgw's startup optimizations.

The plan is to produce two different selection scripts, with names like:
com.example.foo.Foo.nocache.js
com.example.foo.Foo.nocache-inline.js

Each permutation would now produce three files, with names like:
8D9838FD66EB4E60721C0648EC8A0DA1.cache.html
8D9838FD66EB4E60721C0648EC8A0DA1.cache.js
8D9838FD66EB4E60721C0648EC8A0DA1.cache.xml

In the cache.js file, the entire program would be nested inside of a
(possibly anonymous) function to prevent namespace collisions.

Comment 1 by mohammedsaleem, Feb 21, 2007
When is the scheduled date for this feature?
Comment 2 by gwt.team.scottb, Feb 21, 2007
There is not a *date* per se, but if you see the label Milestone-1_4_RC, that label
is intended to communicate that we plan to implement this feature for 1.4.

Comment 3 by mohammedsaleem, Feb 21, 2007
Is there any way to have the common GWT bootstrapping code in another js?  And the
actual module functionality in a separate js.  This way, if we have two modules to be
attached to a page, I don't repeat the common js.  I would have to include only one
of the common gwt js, and then the releveant module js files.
Comment 4 by gwt.team.scottb, Feb 21, 2007
Actually, it's better if you don't.  The most significant speed factor in most cases
is the sheer number of HTTP round trips.  We plan to run the nocache.js files through
a compressor/obfuscator in the upcoming release, so they should get a lot smaller
than gwt.js currently is.  Plus we can optimize them a bit for the specific module
being loaded, instead of having to make it completely generic.

In a future release, what we really want to do is process your HTML file and just
inline the selection script straight into the outer page.  That is, replace your
<script src="com.example.foo.Foo.nocache.js"/> with the actual contents of that file,
to remove another HTTP round trip; then when you GZIP the outer page it should get
really small.

Comment 5 by mohammedsaleem, Feb 22, 2007
thats awesome.  

Regarding the sec para, i would like to have an option for having it as inline versus
a standalone script.
Comment 6 by gwt.team.scottb, Mar 15, 2007
A basic implementation has been checked in as r623.  It still needs to be vetted, and
the naming agreed upon.

Comment 7 by gwt.team.scottb, Apr 11, 2007
This now fixed as of at least r763, if not before.
Status: FixedNotReleased
Comment 8 by gwt.team.bruce, May 29, 2007
Changing to Fixed status with GWT 1.4 RC release
Status: Fixed
Comment 9 by sumitcha...@google.com, Apr 28, 2008
 
Owner: scottb
Sign in to add a comment