[cgiapp] Re: HTML::Template vs Template::Alloy

Rhesa Rozendaal perl at rhesa.com
Mon Jun 23 10:09:05 EDT 2008


Mark Stosberg wrote:
>> It's certainly the slowest option available. That hasn't hurt us sofar, and 
>> we've had some high-profile events (during the Miss Universe competition we 
>> had about 40 million hits per day). On the other hand, we're getting so big 
>> that I'm now looking into the faster options (TT2, Template::Alloy), because 
>> shaving 50ms off every request adds up.
> 
> Rhesa, 
> 
> I hadn't noticed Template::Alloy before. It does like interesting as an
> option that is like HTML::Template with the dot notation, but faster. 
> 
> It doesn't support filters, which is an H::T feature that I use, but I
> could find a way to do that pre-processing before handing the templates
> off to Allow. 

Yeah, lack of filters is slightly annoying, but I'm sure that's easy to work 
around.

> I'm not thrilled that the Alloy  H::T mode includes every templating
> feature on the sun, but perhaps they could be ignored. 

As I understand it, all of the extra features are turned off by default when 
you use the HT mode: see the NO_TT flag under "CONFIGURATION (HTML::Template 
STYLE)".

But I base that solely on reading the documentation, I haven't really tried it.

> I had followed HTML::Template::Compiled with interest in the past, but
> now it has become a suite of about 20 modules with more features and
> complexity than suits me. 

Yeah, I tend to agree. I took it for a spin briefly, and it's fast enough. But 
it specifically didn't implement the feature I needed (nested variables), so I 
basically ignore it now.

> If you do try Template::Alloy, I'll be interested to hear a review of
> that. 

I've put it on my to-do list :)
Hiveminder rocks, BTW.

Rhesa


More information about the cgiapp mailing list