Re: [PHP-XML-DEV] XSL vs. Smary
[email protected] (Christian Stocker) Mon, 18 Oct 2004 08:01:55 +0200
| Newsgroups | php.xml.dev |
|---|---|
| Message-ID | <[email protected]> |
On 14.10.2004 16:15 Uhr, George Schlossnagle wrote: > > On Oct 14, 2004, at 3:06 AM, Philipp Melab wrote: > >> I am building a small, extensible CMS-System for a bunch of simple >> websites (gallery, guestbook, articles... < 20MB) I have to create. To >> reuse the system i need some kind of template engine. At the moment >> I'm stuck between smarty and XSL. >> I already worked with XSL, so the complexity isnt a factor. Im >> thinking about implementing the system with JSP, Servlets too, which >> would make XSL the better choice too. >> What i need to know is the performance factor. Is far as i understood, >> XSL-Tranformations are running natively, but they have to be compiled >> everytime. Smarty-Templates are compiled and cached. >> So, which one is faster? > > > You should benchmark these on your templates. I'm using (the yet > unreleased) fastxsl extension, whose comppiled stylesheet features will > hopefully be added into php5's xsl extension (they have very compatible > architectures). Using that, the transforms were much faster that I > expected. On moderately complex templates, using real world data, I was > seeing a total templatization time of around 0.01 seconds per page, and > had no problems satisfying my performace requirement of 30 pages/second > sustained. I finally looked again at the fastxsl extension. The idea still looks promising and I think, we could integrate that somehow in the standard xsl extension (not decided about the API yet and thread issues..) Just one question: It doesn't look like XSLT files included with xsl:include|import are cached, or am I missing something? chregu > > George > -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | [email protected] | gnupg-keyid 0x5CE1DECB