2009/12/29

GWT 2.0 is finally here!

GWT 2.0 contains huge improvements compared to the previous 1.7 release. I think the most importants are the new development mode and the draft compilation.



Let's start with the less important, draft compilation. By default the GWT compiler generates highly optimized Javascript code. Unfortunatelly this may result in very slow compilation, many minutes for large projects. Draft compilation speeds up the compilation process dramatically by generating unoptimized Javascript code. The difference is remarkable, the following comparation shows the compilation times of a large project I'm working on:

GWT version Compilation time Javascript size (Firefox target)
1.772.234 s1 405 788 bytes
2.0103.966 s1 264 586 bytes
2.0 draft compile48.937 s1 408 284 bytes

By far the most important new feature is the new development mode which replaces the old hosted mode. Before 2.0, application development was sometimes very painful, because the hosted mode GWT shell has very serious problems and limitations. It is built on old and platform-dependent technology, for example in case of Windows it's using an embedded version of the IE6 control, which led to some of the following problems:
With the new development mode the application runs in a real browser, for example in a Firefox 3 - armed with FireBug of course -, so hopefully all the above problems will go away...

2 comments:

  1. There is another way to speed up the compiler, reduce the browser support for compilation (such as compile for firefox only) or compile only your locale

    this link is interesting
    http://blog.bazoud.com/post/2008/07/31/Can-I-speed-up-the-GWT-compiler-Part-II

    ReplyDelete
  2. Thanks for the tip.
    We already use it to speed-up the compilation during development, and we usually build only for FF target (again, because FF is faster and FireBug is great :).

    ReplyDelete