On Sep 9, 8:13 pm, alided <[EMAIL PROTECTED]> wrote:
> Hello,
> I have pretty complex page written in GWT which uses different widgets
> i also use GWT-ext.
> Page loading is very slow take around 10-15 sec. After investigation
> using YSlow i notice that most of the time is spent on round trips to
> load different js and css files. The obvious solution to me is to
> combine many js into one. But the problem is that i don't load those
> js explicitly. It loaded by the widget. What will be the good
> approach ?How to improve it ?

The first thing that came to my mind is: use a better library that
doesn't need those JS files (GXT for instance, where ExtJS isn't
wrapped but has been ported to GWT; so that the Ext code also benefits
from dead-code pruning and other compiler optimizations), or at least
provide "bundled" scripts.

If you want to continue using GWT-Ext, and provided the JS files are
injected through <script/> elements in *.gwt.xml files, you could use
a linker to concatenate the JS files into a single one, or even
concatenate them within the selection script (beware of the
obfuscation done by GWT by default, default variables must be declared
as window expandos or they'll be renamed).
For example, in GWT-in-the-AIR, I made linkers that change the script
injection code in case you're injecting SWF files (flash libraries can
be injected with <script></script> elements in Adobe AIR):
http://code.google.com/p/gwt-in-the-air/source/browse/trunk/src/net/ltgt/gwt/air/core/linker/AirIFrameLinker.java
and I once tried concatenating the AIRAliases.js (hard-coded though,
didn't depend on modules you used):
http://code.google.com/p/gwt-in-the-air/source/diff?r=90&path=%2Ftrunk%2Fsrc%2Fnet%2Fltgt%2Fgwt%2Fair%2Flinker%2FAirIntermediateLinker.java
(GWT might do this automatically for you in a later release)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to