On Sun, Feb 19, 2012 at 4:20 PM, Perrin Harkins <per...@elem.com> wrote: > [ Please keep replies on the list. ] > > 2012/2/19 Frédéric Buclin <lpso...@netscape.net>: >> Le 19. 02. 12 21:57, Perrin Harkins a écrit : >>> That is slow! Are you talking about actual CGI, or are you running in >>> a persistent environment like mod_perl or FastCGI? >> >> Bugzilla supports both modes: mod_cgi and mod_perl. For instance, >> https://bugzilla.mozilla.org uses mod_perl, but there are many >> installations around the world still using mod_cgi. > > Ok. For mod_perl, you should take care to keep your Template object > around between requests, so that it can use the same cache. That > makes a huge difference. > > For CGI (and this won't hurt mod_perl either), you should set > COMPILE_EXT and COMPILE_DIR. More here: > http://tt2.org/docs/modules/Template.html#section_Caching_and_Compiling_Options > > If that isn't enough to make CGI performance decent, you'll probably > have to consider using a different template module. CGI is an extreme > case and most template systems will perform badly when they can't > cache between requests. Text::MicroTemplate is probably your best bet > under CGI. > >> Is there a better tool than Devel::NYTProf to debug TT? It seems to >> return wrong line numbers when looking at templates. > > It's probably giving you line numbers of the compiled templates, not > the original template source. If you turn on the compile cache > options I mentioned above you'll be able to look at the files it > compiles from your templates and the line numbers will make more > sense. > > - Perrin
_______________________________________________ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates