Improving performance with TT2

Frédéric Buclin <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <[email protected]>
Hello all,

We at Bugzilla are heavily using Template Toolkit to generate all our
templates dynamically. But when doing some profiling with
Devel::NYTProf, it appears that TT2 is taking most of the time when
processing a CGI script. This means that some pages can take up to ~10
seconds to render, which is very slow.

I wondered if you could give me some advices about performance. We
really made our best to render pages as fast as possible, but I hope
there is room for more tweaks and improvements.

One question comes to mind: I know TT2 pass variables by data instead of
by references, meaning that variables are copied again and again. As our
pages can be several MB in size, I wondered if splitting a single call
to $template->process() into several calls would really help make things
faster?


Thanks for you help,

Frédéric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.