In order to increase performance, there have been some significant
changes to Woodstock. Please see the Woodstock release notes for more
information. As of the milestone #4 release, the following improvements
have been implemented.
1. Cached resources are set to expire one year from the date the
ThemeServlet was started. This ensures browsers do not generate
"If-Modified-Since" requests for all resources. This is configurable via
the web.xml file.
2. A custom build of Dojo is used to include only the resources
necessary to support Woodstock widgets. Not only does this reduce the
number of requests in the page, but it allows Woodstock to apply better
compression for a smaller footprint.
3. For best performance, widgets are not created until the page has
loaded. This allows for progressive HTML rendering; however, partially
rendered HTML may be displayed before widgets have been created. Now
that Woodstock uses a custom build of Dojo, we can change when widgets
are rendered. Set the |parseOnLoad| tag attribute of the Head tag to
change the default setting.
4. JSF Extensions is lazily loaded if and only if an Ajax feature is
used. This resource can be included directly via the JSF <jsf:scripts/> tag.
5. Woodstock no longer includes the Prototype JavaScript library.
Although, it is still used by JSF Extensions.
6. Woodstock no longer includes the JSON JavaScript file.
7. CSS style sheets are minimized to decrease file size. That is, all
whitespace, new lines, and comments are removed.
8. Although JavaScript files have always been minimized using Dojo's
ShrinkSafe approach, most files are also run through the Dean Edwards
Packer tool using base62 encoding. This approach shall be used when
browsers do not support gzip.
9. To decrease the overall footprint even further, gzip is applied to
Woodstock CSS and JavaScript resources.
To put this all into perspective, here is a look at what was previously
output by 4.1.1 Vs 4.2. Note that several requests have been eliminated
form the page. As compared to 4.1.1, the 4.2 release will reduce our
overall footprint by 614 kb.
4.1.1 Files
Size (kb)
css-master-all.css 118
json.js
3
prototype.js
42
com_sun_faces_ajax.js
19
dojo.js
74
dijit.js
43
webui-jsfx.js
220
i18n.js
9
suntheme.js
137
suntheme.js (localized)
2
blank.gif
43
Total
710
4.2 Files
Size (kb)
css-master-all.css
17
bootstrap.js
29
webui.js
20
suntheme.js
30
Total
96