Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^3: Because CPAN Needs More Templating Modules

by Discipulus (Monsignor)
on Jun 25, 2017 at 09:17 UTC ( #1193501=note: print w/replies, xml ) Need Help??

in reply to Re^2: Because CPAN Needs More Templating Modules
in thread Because CPAN Needs More Templating Modules

Thanks tobyink,

Your benchmarks make it clear. Also to have perl code directly into the template is a plus at least in terms of semplicity. I started programming before separation of concern was so valueted and most times I still prefere having all at glance, more if the project is little or minimal.

What I still wonder is about the dimension of the template itself. When I asked for some bench with big templates I was not speaking about big templates systems but about big template texts.

I mean, there is some performance degradation as the template goes bigger? You shown us a few bytes template: what happens for 10Kb 100Kb 1000kb ones?

I dont want you show all possible benchmarks! you was so kind to share this module and to answer me, I just want to know if you have some theorethical idea about it. If I have the time I'l try to enrich the benchmark you shown.

I suppose that your templates, being in memory coderefs, will be surely fast as perl itself, but they must add their memory footprint into the main process of the program, obviously.

Is this the same of having the template cached? Or the caching ability of Template::Toolkit and others, acts differently? I ask this in the perspective of a persistent application.

For completness i add that the module quoted as super fast was Text::Xslate and the thread was Best way to start a perl project

Docs of Text::Xslate point also to a very exhaustive comparison, if bit aged, between template systems: at Sam Graham's website he used his Template::Benchmark to extrapolates results. Where your module would go?

That said your module will be for sure a good choice for simple things, being all at glance and very perlish, and a good candidate for bigger projects, possibly persistent ones.

Sorry if I abused of you patience and thanks you again!


There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1193501]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2018-07-19 21:33 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (420 votes). Check out past polls.