How use caching with gwt

111 views
Skip to first unread message

HARISH SAHARAN

unread,
Dec 15, 2011, 12:43:33 AM12/15/11
to Google Web Toolkit
Dear all,
I am working on a big project of gwt and i want to know
how to handle the gwt caching tech. and how this is impotent for us
for performance tunning.

Uemit

unread,
Dec 16, 2011, 11:27:50 AM12/16/11
to google-we...@googlegroups.com
You have to clarify what you mean with caching? 

If you refer to caching of the javascript files that are transfered to the client then refer to these docs: 

If you are talking about caching of data then you have several possibilities:
 - caching by storing in static variables

Thomas Broyer

unread,
Dec 16, 2011, 2:36:52 PM12/16/11
to google-we...@googlegroups.com


On Friday, December 16, 2011 5:27:50 PM UTC+1, Uemit wrote:
You have to clarify what you mean with caching? 

If you refer to caching of the javascript files that are transfered to the client then refer to these docs: 

Ed

unread,
Dec 17, 2011, 5:41:19 AM12/17/11
to google-we...@googlegroups.com
Besides caching I would also gzip al the GWT generated files (http://code.google.com/p/google-web-toolkit/wiki/PrecompressLinker)
Use the MultipleView option in for example Apache web server such that the gzip files are picked up automatically (instead of the uncompressed files).
Gziped  files become about 30-50% smaller.
- Ed

Uemit

unread,
Dec 17, 2011, 10:12:19 AM12/17/11
to google-we...@googlegroups.com
@Ed: Interesting, I didn't know about the PrecrompressLinker. What's the difference to configuring the web-server to do gzip compression on the fly? I suppose the advantage is that it doesn't burden the server

Jens

unread,
Dec 17, 2011, 10:19:43 AM12/17/11
to google-we...@googlegroups.com
In addition to saving some cpu time the web server can serve files faster because there is no delay for compressing the file on the fly.

Ed Bras

unread,
Dec 17, 2011, 10:23:08 AM12/17/11
to google-we...@googlegroups.com
@suppose the advantage is that it doesn't burden the server
Exactly.

I has a bit of history: In the past it was seldom that browsers supported gzip so it was ok to do this on a fly. However, nowedays it's the other way around. All modern browsers support gzip, so you should also turn around the configuration: all files are already compressed in gzip and in case the browser really doesn't support gzip, tell the browser t inflate/uncompress it.
Example of inflating config in apache:
 FilterDeclare gzip CONTENT_SET
 FilterProvider gzip inflate req=Accept-Encoding !$gzip
 FilterChain gzip

See:

- Ed




On Sat, Dec 17, 2011 at 4:12 PM, Uemit <uemit...@gmail.com> wrote:
@Ed: Interesting, I didn't know about the PrecrompressLinker. What's the difference to configuring the web-server to do gzip compression on the fly? I suppose the advantage is that it doesn't burden the server

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/xmSKRf1D5W4J.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages