myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "Performance" by MartinMarinschek
Date Mon, 24 Apr 2006 16:31:33 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by MartinMarinschek:
http://wiki.apache.org/myfaces/Performance

------------------------------------------------------------------------------
  
  First step - don't use client-side state saving except for development. 
  
- javax.faces.STATE_SAVING_METHOD=SERVER
+ {{{
+     <context-param>
+         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+         <param-value>SERVER</param-value>
+      </context-param>
+ }}}
  
  Next step - disable compression of state in server:
  
- org.apache.myfaces.COMPRESS_STATE_IN_SESSION=false
+ {{{
+     <context-param>
+         <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
+         <param-value>false</param-value>
+      </context-param>
+ }}}
  
  Very important, too, is to disable the serialization of state, serialization and deserialization
of the component tree is a major performance hit. There is work being done to ensure that
the serialization provider is pluggable, and that optionally JBoss serialization may be used.
  
- org.apache.myfaces.SERIALIZE_STATE_IN_SESSION=false
+ {{{
+     <context-param>
+         <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
+         <param-value>false</param-value>
+      </context-param>
+ }}}
  
  Another performance factor is the MyFacesExtensionsFilter. The MyFacesExtensionsFilter buffers
and parses the response on every request. You can disable this, and still gain all functionality
the ExtensionsFilter is providing, by doing two things:
  
- 1.) set the context-param org.apache.myfaces.ADD_RESOURCE_CLASS=org.apache.myfaces.component.html.util.StreamingAddResource
+ 1.) set the context-param 
  
- 2.) get rid of the <HEAD> tag in your HTML, and instead use Tomahawk's <t:documentHead/>
tag.
+ {{{
+     <context-param>
+         <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
+         <param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value>
+      </context-param>
+ }}}
+ 
+ 2.) get rid of the <HEAD> tag in your HTML, and instead use Tomahawk's <t:documentHead/>
tag. Of course, your <f:view/> tag has to enclose your <t:documentHead/> tag for
this to work.
  
  That should be it - with these settings, you should be running much better performance wise.
  

Mime
View raw message