|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NetworkPerformance
Note that in addition to these network
performance considerations, you should also be aware of the recommended application design practices discussed in SmartArchitecture
.
There are three main ways of improving the performance of your application:
Compression
You'll want to deliver as much of your application assets compressed as
possible. For a start, the Smart GWT modules come pre-compressed. The Compression
section describes how to make sure that Smart GWT modules and your application logic are delivered compressed and how to
enable dynamic compression of your dynamic content.
Compression drastically reduces transfer times to the browser. Compression ratios for css and javascript files can be as high as 8:1.
Caching
The Caching
section deals with delivering as much content as possible with caching headers.
Setting these headers allows the end-user's browser and any intermediary proxies to keep a local copy of the file across
browser reloads, ensuring the subsequent visits require almost no fetches from the server. Eliminating these fetches is
also important for the reasons explained under File Assembly below.
File Assembly
Modern browsers limit the number of HTTP connections they use to fetch the assets required to render your pages - typically to just 2 connections. As a result, connection latency can play a much higher role than available bandwidth and the two connection limit effectively drastically limits the user's usable bandwidth. For this reason, it's important to minimize the number of HTTP requests made to the server. The File Assembly services make it easy to deliver multiple css and javascript file via one HTTP response. Assembling files together also helps to increase the compression ratio because the commpression engine has more redundant data to work with.
FileLoader
The FileLoader is
a standalone client-side module that allows you to performing caching or loading of various resources in the background
on any page. The typical usage pattern is to use this module to pre-cache Smart GWT modules, skin images, and
application logic while the user is, for example filling in a login form. See the com.smartgwt.client..FileLoader
documentation on usage.
SSL Considerations
Some quirks to be aware of when optimizing for pages servied via HTTPS:
com.smartgwt.client..FileLoader
even more important for SSL
applications. IE will cache SSL content across browser restarts. Other Tips
1. Modern applications often use a number of cookies to keep track of session state, application state, etc. If you don't limit the paths these cookies are served for, you can easily end up with these cookies being sent to the server with every HTTP request as part of the HTTP headers. This can severely limit bandwidth where a large number of requests are made - typically for skin images. Also note that most technologies used by end-users to connect to the internet such as DSL and Cable are half-duplex, meaning that downstream must pause for upstream traffic to be sent and these connections also are asymmetric, allowing much faster download speeds than upload speeds. As a result, the limited upstream capability of most connections ends up limiting the download bandwidth by delayng the download of other assets required to render the page.
2. Whenever possible, don't sent the "Cache-Control" header to "private" - this tells intermediary proxies to not allow caching of the specified content, eliminating that cache as a useful intermediary for other users behind it.
3. For a good overview of performance considerations, see this post: http://www.die.net/musings/page_load_time/
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |