Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Speeding up GWT

DZone's Guide to

Speeding up GWT

· Java Zone ·
Free Resource

The CMS developers love. Open Source, API-first and Enterprise-grade. Try BloomReach CMS for free.

I’ve recently come across a few great resources on how to speed up client-side GWT:

  • Effective GWT: Developing a complex, high-performance app with Google Web Toolkit
    Describes interesting tricks for making your application faster. One of the main challenges for them was to make everything work with IE 6. Interesting points were:
    • DeferredCommand can be used to execute code after the current invocation. Very handy in event handlers where performing complex user interface changes can lead to weird behavior, such as the “bleeding through” of return keys, etc. This may well have been the most important take-away of the talk for me (as I am currently not too concerned about performance in my projects).
    • Generating HTML (on the client) and letting the browser parse it is fastest for generating DOM. I’m assuming that is as far as IE 6 is concerned where each created JavaScript object is very costly.
    • Foreach is slow, because an iterator (=JavaScript object) has to be created. With an integer index, this does not happen.
    • Programmatic manipulation of styles via widget.getElement().getStyle() is slow, using CSS is faster.
  • Simpler and Speedier GWT with Server Side RPC Serialization
    It is a common technique to make the first remote procedure call (RPC) directly after the page has loaded. To improve performance, one can simulate that RPC and embed the result inside the web page on the server. The previous talk mentioned this trick which lead me to investigate further and find this article.
  • Resource Bundles and Linkers in Google Web Toolkit
    This talk goes further into details how data can be served more compactly. It was linked from the previous article.

 

From http://2ality.blogspot.com/2010/04/speeding-up-gwt.html

BloomReach CMS: the API-first CMS of the future. Open-source & enterprise-grade. - As a Java developer, you will feel at home using Maven builds and your favorite IDE (e.g. Eclipse or IntelliJ) and continuous integration server (e.g. Jenkins). Manage your Java objects using Spring Framework, write your templates in JSP or Freemarker. Try for free.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}