Build Time Slow

246 views
Skip to first unread message

Murray

unread,
Aug 12, 2010, 7:39:18 PM8/12/10
to gwt-cal
I really like what you have done here. This looks like a really good
fit for my application and we plan on using it.

However, I noticed that when I build my project with the gwt-cal-0.9.1
jar included in my project my build time increases from 1.5 minutes to
8.5 minutes. Any idea why this is happening. This seems to be an
excessive increase for just adding a jar file to the project. I have
compiled on both a Mac and a PC with the same effect. I am using
NetBeans as my IDE.

Pierre Vittet

unread,
Aug 13, 2010, 3:19:25 AM8/13/10
to gwt...@googlegroups.com
Hi,

This looks like you are discovering gwt's pleasure. :). When compiling
the file that use gwt-cal, it creates a javascript 'permutation' for
each navigator/locale, which is pretty long. If you don't modify the
file, you don't have to compile it for a new time. If you want to test
change without recompiling, you can go use a debug mod ('ant devmode',
look at
http://code.google.com/intl/fr/webtoolkit/gettingstarted.html#running).

Well, i hope that help you.

Pierre Vittet

bradr

unread,
Aug 15, 2010, 4:47:38 PM8/15/10
to gwt-cal
Hey Murray,

Pierre is right. GWT creates multiple permutations of your javascript
code ... 1 for each browser / locale combination. So if there are 10
locales (english, polish, french, etc) and 4 browsers (IE, Firefox,
Chrome, etc) it will create 40 different compiled JS files.

If you are only building your application for a single locale (ie
English) you can specify this to reduce your compile time. Here is
what I do in my application's module xml file:
<extend-property name='locale' values='en'/>
<set-property-fallback name='locale' value='en'/>
<set-property name='locale' value='en'/>

Also, as Pierre mentioned, using Hosted Mode is ESSENTIAL for gwt
developers. Hosted mode allows you to run your application without
compiling. You can even make changes which are immediately reflected
in your web application just be refreshing the page. Basically it is
using a gwt browser plugin to run java byte code in your browser.

Make sure you check out some of the Google IO 2009 presentations ...
they specifically talk about gwt's compile process, how it works, and
some tips to speed it up. But they definitely stress the importance of
Hosted Mode

I loved Netbeans, but eventually had to switch to Eclipse because it
has such tight integration with GWT and the ability to leverage the
Hosted Mode functionality.

larry_strickland

unread,
May 2, 2012, 6:35:12 PM5/2/12
to gwt...@googlegroups.com
I've tried adding this to my module xml file, but still the GWT compiler builds 66 permuntations - where do I look next?
Reply all
Reply to author
Forward
0 new messages