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)?
>
Even though each permutation simply contains a different class in
place of the gwt.creates it would be wrong to think that it can
leverage the work of a different yet completed compile. The only bit
it can leverage and reuse is the initial work done in the beginning of
building the ast of the java source. The compilation process involves
a lot more work after this point. It's not a one or two phase process.
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.
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. In effect it continues to try to optimize until they all -
and there are many- all give up having tried their best. Every loop
thus involves attempts to find unused methods/classes and their
elimination. Method inlining is also attempted in each pass. Some
times q pass only changes one or two little nodes in the ast but all
optimizers try again next time round.
There is lots of other cool stuff there trying to save javascript
bytes and unfortunately it costs.
> It seems like GWT's "permutations" system is really it's greatest
> problem for me right now. I think there are relatively few classes
> that differ between permutations and the performance gains are
> probably not that great.
>
> I think it would be a lot better for my purposes to have a single
> permutation and just have GWT.create() instantiate the right generated
> subclass for the current browser/language setup. In fact, that would
> cut my compile time down to just 2 or minutes.
>
> Has anyone actually measured the benefits of compiling separately for
> each browser as opposed to just using an appropriate subclass?
>
> Any idea how much work it would be to customize the compiler to work
> this way?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---