[Templates] Can there be two?
Paul Seamons
mail@seamons.com
Thu, 11 May 2006 13:45:29 -0600
> > So it is only 50% faster on the cached in memory templates. It is
> > actually slower if you are using XS. If you are using cached in memory
> > templates, you are going to see the least amount of return from using
> > CGI::Ex::Template.
>
> I would expect any TT user concerned about performance to be using
> cached templates and the XS stash.
I think most people are concerned about performance - even if it is a second
thought. I think there are plenty of people who don't have a choice about
how the server they're using is configured.
I do agree though that those who are really really concerned about the
performance have tuned their code to the nth level.
> > The interesting thing is that TT in memory and using XS is only 100%
> > faster than CGI::Ex::Template getting a new object each time. Without
> > XS, TT in memory is only 40% faster than CGI::Ex::Template getting a new
> > object each time.
>
> Sounds like it could be great for people who are stuck using CGI.
Yup. :)
> TT
> doesn't perform well without the cache.
Bare TT does OK. Stash XS and cached templates just do better.
CGI::Ex::Template just is a step towards making them not be as necessary.
Of course I don't think there is anything keeping somebody from writing the
get_variable and set_variable routines of CGI::Ex::Template in xs. That
would be interesting.
Paul