voyent
BUG: icefaces 3.0.1 no Gzip Compression  XML
Forum Index -> Components
Author Message
sam_louis

Joined: 01/Apr/2010 00:00:00
Messages: 7
Offline


For some reason our icefaces installation as well as the showcase it has no compression for javascript verified using Chrome and Firefox.

Anyone knows why this should be the case according the documentation this should be enabled by default.
Thank you
artzambrano

Joined: 21/Mar/2007 00:00:00
Messages: 177
Offline


Can you tell me which resources aren't being compressed?

The compression refers to simply compressing the javascript source code (using the YUI compressor) to make files smaller by making variable names shorter, removing comments, removing white space, etc., while keeping the code syntactically correct.

The build script only takes care of compressing the .js files that are actually used by the components in a production environment (i.e. the ones that are declared in the @ResourceDependencies annotations). All other source .js files aren't compressed. For example, in ACE components, the source .js files are concatenated into 5 different files for production: ace-components.js, ace-datatable.js, ace-jquery.js, ace-menu.js, and ace-yui.js. Then, these five files are compressed.

I just downloaded a 3.0.1 release source bundle and built the whole project without modifying anything in the build files. The generated icefaces-ace.jar file contained these five files compressed (under META-INF/resources/icefaces.ace/util). The binary release already has these files compressed.

The 'no-compress' property in build.properties in the ACE folder determines whether there should be compression or not. It is commented out by default.

Art Zambrano
ICEsoft Technologies Inc.
artzambrano

Joined: 21/Mar/2007 00:00:00
Messages: 177
Offline


Let me correct that. Actually, we have had an option since ICEfaces 2.0 to compress resources, which I think is the one you actually mean:

http://wiki.icesoft.org/display/ICE/compressResources

A developer of the core framework will be taking a look at the problem you report.

Art Zambrano
ICEsoft Technologies Inc.
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


If you are running with Mojarra, try using the following context parameter:


<context-param>
<param-name>com.sun.faces.compressableMimeTypes</param-name>
<param-value>text/*</param-value>
</context-param>

You can set the value to the content types you would like to have compressed. Note that if you set the project stage to development:

<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>

no compression will be applied.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
Admin

Joined: 27/May/2004 00:00:00
Messages: 219
Offline


Hi,

Deryk has also added a new ICEfaces Wiki doc page that explains the resource compression options for ICEfaces:

http://wiki.icesoft.org/display/ICE/Resource+Compression

Regards,
Ken
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team