Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Speed Comparison of Template (TT2/3) to Template::Alloy

by zerohero (Monk)
on Jan 09, 2010 at 20:44 UTC ( [id://816542]=perlquestion: print w/replies, xml ) Need Help??

zerohero has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone have experience with performance comparisons when comparing Template to Template::Alloy? I'm using this in the context of Catalyst.

Replies are listed 'Best First'.
Re: Speed Comparison of Template (TT2/3) to Template::Alloy
by chromatic (Archbishop) on Jan 09, 2010 at 22:36 UTC

    Be careful to profile network IO as well as CPU time.

      Hi, I'm the author of Alloy.

      I'm guessing for most end user deployed applications, you probably wouldn't see a whole lot of difference between the two.

      If your application is running under mod_perl or fast_cgi you probably won't see a lot of difference.

      Similar to what chromatic was pointing to with network and io, if your application is db throttled or file system throttled, or most of the time is spent in the processing of your model (as life should be), then you probably won't see a whole lot of difference.

      If your template has a large number of low level loops and iterations, you may not see a whole lot of difference.

      I think you may notice a trend here. There are some situations where Alloy is faster. A few where it is much faster. There are some items I've come across where Alloy is a few percentage points slower. And there are many many many templates where the performance is the same. Really, the only way to know is to put your application through the paces. TT and Alloy should be interchangeable for most templates, so you should be able to switch back and forth and see which one is best in your specific application.

      I'd love be able to point to a more specific answer - but too much depends upon server architecture, server load, model architecture, and view complexity. Before you worry too much about the speed difference between Alloy and Template, you may want to look into what percentable of time is spent in the templating phase.

      my @a=qw(random brilliant braindead); print $a[rand(@a)];

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://816542]
Front-paged by zwon
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-29 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found