You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by "Michael P. Jung" <su...@gmail.com> on 2004/09/14 13:59:30 UTC
publication-sitemap.xmap wastes a lot of time when rendering the Reader's View (Live).
Hi everybody,
I bought a nice book about Cocoon a few weeks ago. After browsing the
web for a decent CMS I stumbled over Lenya which seamed to be the
perfect choice as I could combine my newly obtained knowledge about
Cocoon with a quite powerful CMS.
However, the quality and performance of the default publication was a
bit frustrating and I started to dig into the depths of Lenya. After a
few hours I came up with some new XSL files which produces HTML code
that is just good enough for my CSS-addicted brain and found a way to
speedup Lenya by the factor 2 (two!) with only four lines added in the
publication-sitemap.xmap:
--snip--
Index: src/webapp/lenya/pubs/default/publication-sitemap.xmap
===================================================================
--- src/webapp/lenya/pubs/default/publication-sitemap.xmap (revision 46019)
+++ src/webapp/lenya/pubs/default/publication-sitemap.xmap (working copy)
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<!-- $Id: publication-sitemap.xmap,v 1.77 2004/09/01 23:26:48 michi Exp $ -->
+<!-- $Id$ -->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
@@ -157,11 +157,15 @@
<map:select type="browser">
<map:when test="mozilla5DISABLED">
- <map:transform
src="cocoon://lenya-page/{page-envelope:publication-id}/{../1}.xml?doctype={page-envelope:document-type}&uiml=xul"/>
+ <map:match pattern="authoring/**.html">
+ <map:transform
src="cocoon://lenya-page/{page-envelope:publication-id}/{../../1}.xml?doctype={page-envelope:document-type}&uiml=xul"/>
+ </map:match>
<map:serialize type="xml"
mime-type="application/vnd.mozilla.xul+xml"/>
</map:when>
<map:otherwise>
- <map:transform
src="cocoon://lenya-page/{page-envelope:publication-id}/{../1}.xml?doctype={page-envelope:document-type}"/>
+ <map:match pattern="authoring/**.html">
+ <map:transform
src="cocoon://lenya-page/{page-envelope:publication-id}/{../../1}.xml?doctype={page-envelope:document-type}"/>
+ </map:match>
<map:transform src="../../xslt/util/strip_namespaces.xsl"/>
<map:serialize type="html"/>
</map:otherwise>
--snip--
I did a little benchmark of the live site using the Apache
benchmarking tool and came up with those rendering times:
Default Publication:
- unmodified : ~200ms / request
- patched : ~90ms /request
My System: P4 2,8GHz, 1 GB RAM, Debian GNU/Linux Sarge (with pinned
SID), Lenya SVN (BRANCH_1_2_X) and Tomcat 5.0.27
This was probably the performance killer No1.
Greetings,
Michael
ps.
When I find some time I'd like to contribute the changes of the XSL
files as a new publication. I call it the "clean" publication as it
uses all those fancy CSS tricks and produces a very clean HTML output.
- Anything wrong with that name?
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org