This will make initial load of the RHQ GUI significantly faster for users with slow network connections between their RHQ Server and their web browser.
There are a few ways this can be done:
1) Configure Tomcat to do the compression at the HTTP(S) connector level - see http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
2) Configure a servlet filter that does the compression - see http://raibledesigns.com/rd/entry/the_battle_of_the_gzip
3) Configure GWT to do the compression (only available in GWT 2.1 or later, so this is not an option util we upgrade GWT) - see http://code.google.com/p/google-web-toolkit/wiki/PrecompressLinker
I think 1) is the way to go, since the Tomcat code is most likely fairly battle-hardened.
Approach 1 has been implemented - [master b93c06c].
Specifically, the following attributes were added to the http and https connectors in the RHQ Server's Tomcat/JBossWeb server.xml:
Before configuring compression, the very first load of coregui took about 30 seconds for me. After adding it, it took only 10 seconds (3x faster!). And my browser was on the same machine as my RHQ Server - the savings for remote clients will be even greater.
Note, we should consider switching to approach 3) once we've upgraded to GWT 2.1 or later, since the GWT preecompress filter supports precompression of the files as well as caching of the compressed files, whereas Tomcat always (re)compresses the files on demand.
documenting the verification as follows:
1) I see gzip in the HTTP request header (from Firebug), as documented below
X-Powered-By Servlet 2.4; JBoss-4.2.0.CR2 (build: SVNTag=JBoss_4_2_0_CR2 date=200704160918)/Tomcat-5.5
Date Tue, 24 May 2011 12:50:06 GMT
Expires Wed, 23 May 2012 12:50:06 GMT
Last-Modified Mon, 23 May 2011 15:44:04 GMT
Content-Encoding gzip <<<<<<<<<<<<<<<VERIFICATION<<<<<<<<<<
Request Headersview source
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:220.127.116.11) Gecko/20110428 Fedora/3.6.17-1.fc14 Firefox/3.6.17
Cookie RHQ_Session=-703695851; JSESSIONID=984E5DDB15234CB39D8743336288AC5A; sahisid=sahi_3c40d04800a93045340834b0dc8d6aea7e65
2) a Firefox plugin called "YSlow" grades RHQ with a "B" for gzip compression.
Bulk closing of old issues that are in VERIFIED state.