Performance Gotchas in XSLT?
This is an open discussion with 23 replies, filed under XSLT.
Search
Exciting stuff indeed! =)
Most shared hosts will not be able to use it since it's a modification of PHP itself, written in C.
Oh I know, it wouldn't be something in the core, this is just a nice extra bit that those implementing large sites with huge amounts of traffic could implement.
My initial local tests aren't very promising with XsltCache actually taking longer to handle requests. My test site isn't very complex though, so I'd like to test it tomorrow on something real before I post results :)
Create an account or sign in to comment.
Exciting stuff. I managed to get this working, unfortunately it's not quite as easy as what I mentioned above, but still doable if someone would like to test it out in their environment. All these changes happen to the
XsltProcess
class.Line 86
if($xsl) $this->_xsl = str_replace('./workspace/', '../../workspace/', $xsl);
Line 91
Change
XsltProcessor
toXsltCache
Line 122
Change
XsltProcessor
toXsltCache
Line 145
Comment out and replace with
XSLCache doesn't support dynamic templates, which is what Symphony uses to build pages, so to get around this and use a 'file' template, we're saving a a very simple template to the CACHE directory. The
str_replace
is necessary because Symphony usually uses the root as the base, so inside theCACHE
folder won't match the same paths.Actual benchmarks to follow.