Using GWT code splitting in RHQ

Jiri Kremser jkremser at redhat.com
Mon Apr 15 13:11:42 UTC 2013


Hi,
  the size of generated JavaScript is pretty large. Using the unobfuscated code (<gwt.style>PRETTY</gwt.style>) the size of the largest file is 2.8 MB. This file is downloaded immediately after successful login. 

I was playing with the GWT code splitting [1] feature and split the coregui into 9 smaller pieces (more or less according to the top menu in the app). After this change, the largest chunk of JavaScript code is now 740 kB large (~ 1/4 of the original size, again unobfuscated). The files with the code are downloaded on demand as needed by user. It means that some parts needn't to be downloaded at all (the test page (#Test), help, reports, etc.). This change should shorten the loading time especially for users with slow connection and for mobile devices.

I haven't seen any negative impact yet, the dev mode keeps working with code splitting. If you have any concerns, please respond to this email. It is not merged to master branch yet.


[1]: https://developers.google.com/web-toolkit/doc/latest/DevGuideCodeSplitting
[2]: https://github.com/rhq-project/rhq-core/blob/master/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java#L370:L398


More information about the rhq-devel mailing list