Hi,

I developed a GWT / SmartGWT based app and deployed it on the app
engine. I'm trying to optimize the performance of the app. Using
firebug, I found that some static content is not returned to the
client in the compressed format (even though the request header says
Accept-Encoding:gzip,deflate,sdch) while other content is returned in
compressed format.

For example, some of the SmartGWT js files are returned in the
compressed format while others are not. All images are returned
uncompressed. Here are the request / response headers for the js file
which is compressed:

Request URL:http://myappid.appspot.com/mydir/sc/modules/ISC_Core.js
Request Method:GET
Status Code:200 OK

Request Headers
Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Host:myappid.appspot.com
Referer:http://myappid.appspot.com/
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/
534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16

Response Headers
Cache-Control:public, max-age=600
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:171011
Content-Type:application/x-javascript
Date:Mon, 25 Apr 2011 11:36:59 GMT
ETag:"mXN4tA"
Expires:Sun, 24 Apr 2011 16:25:20 GMT
Server:Google Frontend

Note that the response content encoding is gzip above. The original
file size is about 650+KB, while the compressed size is 167KB.

However, another js file from the SmartGWT package is returned
uncompressed. Here are the request/response headers:

Request URL:http://myappid.appspot.com/mydir/sc/modules/ISC_Grids.js
Request Method:GET
Status Code:200 OK

Request Headers
Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Host:myappid.appspot.com
Referer:http://myappid.appspot.com/
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/
534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16

Response Headers
Cache-Control:public, max-age=600
Content-Type:application/x-javascript
Date:Mon, 25 Apr 2011 11:37:01 GMT
ETag:"mXN4tA"
Expires:Mon, 25 Apr 2011 11:47:01 GMT
Server:Google Frontend
Transfer-Encoding:chunked


Note "Transfer-Encoding:chunked".

Similarly all images are returned uncompressed:

Request URL:http://myappid.appspot.com/images/myimgname.png
Request Method:GET
Status Code:200 OK

Request Headers
Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Host:myappid.appspot.com
Referer:http://myappid.appspot.com/
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/
534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16

Response Headers
Cache-Control:public, max-age=600
Connection:Keep-Alive
Content-Length:113341
Content-Type:image/png
Date:Mon, 25 Apr 2011 11:37:18 GMT
ETag:"mXN4tA"
Expires:Mon, 25 Apr 2011 11:47:18 GMT
Server:Google Frontend


The settings in my appengine-web.xml file are:

  <!-- Configure serving/caching of GWT files -->
  <static-files>
    <include path="**" />

    <!-- The following line requires App Engine 1.3.2 SDK -->
    <include path="**.nocache.*" expiration="0s" />

    <include path="**.cache.*" expiration="365d" />
    <exclude path="**.gwt.rpc" />
  </static-files>


My GAE version is 1.4.3. GWT version is 2.1.

Can some help me understand why the compression behavior is
inconsistent, and what I can do to fix it? I'm just beginning to get
familiar with GWT / GAE. I'll really appreciate any help on this.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to