[Catalyst] Slow template processing on debian lenny

Terence Monteiro terence at deeproot.co.in
Mon Sep 15 16:23:50 BST 2008


Jose Luis Martinez wrote:
> Terence Monteiro escribió:
>> On my machine, an ubuntu hardy, it works fast - about 2.5 seconds to
>> process the template. On a production server using debian lenny, it
>> used to
>> take around the same amount of time. But recently, I upgraded it to
>> libperl
>> 5.10 and updated the different Perl modules including Template and
>> Catalyst::View::TT. After this upgrade, the same template takes 25
>> seconds
>> on average to process. The times I am mentioning are the times taken
>> on the
>> server side, as shown by the Catalyst application debug logs.
> 
> Maybe Template Toolkit is packaged without the XS module enabled?
> 
> http://search.cpan.org/~abw/Template-Toolkit-2.20/lib/Template/Stash/XS.pm

When I run

  perl -MTemplate::Stash::XS -e 'print "No problem\n"'

it tells me that Template::Stash::XS is present.

I dumped c.session, c.config and c.stash into a YAML file, read it using a
script and used the data to process my template. It took just 0.62 seconds,
which is way faster than when C::V::TT processes it. I actually did some
tests to verify whether it is a TT problem, but it does not occur when I
use the Template module directly. The log information and test results seem
strange, and I still cannot point my finger on a specific Perl module.
Could it be a libperl issue? My libperl5.10 version is 5.10.0-13 from
debian lenny.

-- 
Thanks and Regards,
Terence Monteiro.

DeepRoot Linux,
http://deeproot.co.in




More information about the Catalyst mailing list