Re: [htmltmpl] Speeding up H::T

2006-06-27 Thread Sam Tregar
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

Re: [htmltmpl] Speeding up H::T

2006-06-27 Thread Matthew
Sam, Are you pre-caching your templates in startup.pl? There's a recipe Nope. I found the recipe and will try to incorporate that later this week. Also, are you loading many templates and doing includes manually? Switching to tmpl_include (which is processed at compile time) can be

Re: [htmltmpl] Speeding up H::T

2006-06-27 Thread Sam Tregar
On Tue, 27 Jun 2006, Matthew wrote: Also, are you loading many templates and doing includes manually? Switching to tmpl_include (which is processed at compile time) can be Not sure what you mean. Some people do stuff like: my $header = HTML::Template-new(...); my $body =

Re: [htmltmpl] Speeding up H::T

2006-06-27 Thread Jim Spath
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. You also might look into HTML::Template::Pro. Its latest

[htmltmpl] Speeding up H::T

2006-06-26 Thread Matthew
Hey guys, Over the weekend, we (finally!) moved our company's primary web-app from CGI over to mod_perl and incorporated H::T. The funny thing is that I started doing some speed comparisons using ApacheBench of our MP version vs CGI. Short story is, both CGI and MP preformed about the

Re: [htmltmpl] Speeding up H::T

2006-06-26 Thread Mathew Robertson
Hi Matthew, Are you using 'global_vars', then H::T can be made to have a very large speed up by replacing the code from lines 2624-2650 with: if (scalar(@{$options-{associate}})) { my @undef_params; foreach my $param (keys %{$self-{param_map}}) { next if (defined