ivelin 2002/10/13 08:09:54 Modified: src/documentation/xdocs performancetips.xml Log: document the pipeline "expires" parameter Revision Changes Path 1.9 +54 -0 xml-cocoon2/src/documentation/xdocs/performancetips.xml Index: performancetips.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/performancetips.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- performancetips.xml 12 Aug 2002 21:55:46 -0000 1.8 +++ performancetips.xml 13 Oct 2002 15:09:54 -0000 1.9 @@ -94,6 +94,51 @@ take more time to process them. In worst case scenario, slowdown up to 10% could be achieved (unscientifical observations, do your own test).</li> + + <li> + <p> + Utilize the pipeline <code>expires</code> parameter to dramatically reduce + redundand requests. Even the most dynamic application pages have a + reasonable period of time during which they are static. + Even if a page doesn't change for just one minute, still use the + <code>expires</code> parameter. Here is an example: + </p> +<source><![CDATA[ +<map:pipeline> + <map:parameter name="expires" value="access plus 1 minutes"/> + ... +</map:pipeline> +]]></source> + <p> + The value of the parameter is in a format borrowed from the Apache HTTP module mod_expires. + Examples of other possible values are: + </p> +<source><![CDATA[ +access plus 1 hours +access plus 1 month +access plus 4 weeks +access plus 30 days +access plus 1 month 15 days 2 hours +]]></source> + <p> + Imagine 1'000 users hitting your web site at the same time. + Say that they are split into 5 groups, each of which has the same ISP. + Most ISPs use intermediate proxy servers to reduce traffic, hense + improving their end user experience and also reducing their operating costs. + In our case the 1'000 end user requests will result in just 5 requests to Cocoon. + </p> + <p> + After the first request from each group reaches the server, the expires header will + be recognized by the proxy servers which will serve the following requests from their cache. + Keep in mind however that most proxies cache HTTP GET requests, but will not cache HTTP POST requests. + </p> + <p> + To feel the difference, set an expires parameter on one of your pipelines and + load the page with the browser. Notice that after the first time, there are no + access records in the server logs until the specified time expires. + </p> + + </li> </ul> </s1> @@ -143,6 +188,10 @@ <li>Try to keep the size of the documents going through the pipeline small. To big documents slows down translation.</li> + + <li>Use the <code>expires</code> parameter (see above) as frequently as you can. + It improves the end user experience dramatically. Browsers and intermediate + proxy servers love the HTTP <code>Expires</code> header.</li> </ul> </s1> @@ -184,6 +233,11 @@ <li>How complicated are the XSLT stylesheets? If you are not using global variables or parameters this will speeds things up.</li> + + <li>Consider using XSLTC instead of Xalan. XSLTC compiles XSLT to bytecode (translets) + the first time a stylesheet is used. Consequently it uses the compiled code + which is faster by a magnitude than the interpreted one.</li> + </ul> </s1> </body>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]