|Problems? Is your data what you think it is?|
Re^2: Speed Comparison of Template (TT2/3) to Template::Alloyby Rhandom (Curate)
|on Jan 11, 2010 at 16:17 UTC||Need Help??|
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)];