Re: [htmltmpl] Speeding up H::T
Brought to you by:
samtregar
From: Sam T. <sa...@tr...> - 2006-06-27 17:24:57
|
On Mon, 26 Jun 2006, Matthew wrote: > I've already got "use HTML::Template" in my startup.pl so > theoretically its being compiled at server start (anyway to verify > this?). But its the instantiation in my handler() routine that's using > the CPU time. > > How I can I get H:T to preform better? Are you pre-caching your templates in startup.pl? There's a recipe for that in the HTML::Template docs. After you do it, turn on cache_debug and see if you're getting 100% cache hits (you should if you did it right). Also, are you loading many templates and doing includes manually? Switching to tmpl_include (which is processed at compile time) can be much faster. Lastly, if you absolutely gotta have more speed, you could try HTML::Template::JIT. It's got some drawbacks - not all of HTML::Template's syntax is supported and compilation times are long - but it is reliably 4 to 8 times faster. -sam |