Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) 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)];

In reply to Re^2: Speed Comparison of Template (TT2/3) to Template::Alloy by Rhandom
in thread Speed Comparison of Template (TT2/3) to Template::Alloy by zerohero

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 12:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found