On Thu, Apr 23, 2009 at 5:43 PM, mP <[email protected]> wrote:

>
> On Apr 24, 3:49 am, Dobes <[email protected]> wrote:
> > I'm considering translating my app, but I realized that it currently
> > takes 12 minutes for GWT to compile the application - thus, for five
> > languages would it take an hour, is that right?
> >
> > Or is the compiler smart enough to realize that the only thing that
> > changes between these versions is those strings (no code is changing,
> > so why recompile and re-optimize it all)?
> >
>
> In the case of i18n it doesn't simply put the right i18n class in the
> right spot and generate javascript straight away. If it did
> compilation would be much faster but one would lose all the aggressive
> benefits like unused code elimination.
>

The only thing that would change between languages is the localized strings,
why not take advantage of this information in the GWT system?  They could
have a special tag <language .../> or somesuch to specify additional
languages and for localized objects merely replace the default strings with
the localized ones, something that could be done in minutes instead of
seconds.

Instead they opted to use this generic permutation system that,
unfortunately, results in massive amounts of extra compile time :-(.

Come to think of it, I could probably write a script that takes the english
strings, the translated strings, and the html outputs from GWT and generate
a new translated file by appending the locale to the file name, so I'd get
12334798234.html.fr for the french file, and also generate a
my.package.Module.js.en which uses the localized html files.  This would
take seconds and lose nothing in speed, unless there's something important
I'm missing.  If this feature were built into GWT, more's the better!  First
I suppose I'll have to write the script, then maybe I can submit a patch.


> If you take a look at the main compile loop you will see it repeats
> running thru all it's strategies until none them managed to make any
> chsnges.


This sounds a bit excessive - is there a way to tone that back?  I'd bet
that the benefit of the additional repetitions quickly becomes fairly minor.
 Perhaps a command-line parameter to set the maximum number of optimisation
repeats would also speed up my compiles a lot.  Perhaps I'll have a look at
that ... last time I tried to muck around in the GWT source I couldn't
figure out how to build the jars from source but I might try again if I can
save myself hours of compilation time.


> There is lots of other cool stuff there trying to save javascript
> bytes and unfortunately it costs.
>

Yes, it costs.  Is it worth it?  Maybe not ... I'd rather have fast
development times and "good enough" code optimization than slow development
time and maximum optimization.

--~--~---------~--~----~------------~-------~--~----~
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