Re: [htmltmpl] Speed loss with parameters global_vars and loop_context_vars
Brought to you by:
samtregar
From: Alex K. <ka...@ra...> - 2005-12-14 12:08:54
|
* Oli...@t-... <Oli...@t-...> [December 14 2005, 15:00]: > I coded a site with an outer loop, an inner loop and an inner inner loop. global_vars and loop_context_vars were on. > > I was wondering about the time the output of this site lasts: 14 seconds ! After this I turned gobal_vars and loop_context_vars off and was wondering again: the output was processed after 1.5 seconds. > > I wrote a simplified Example (see below) and got the following results on my system: > global_vars=1, loop_context_vars=1: 2.4 seconds > global_vars=1, loop_context_vars=0: 5.7 seconds > global_vars=0, loop_context_vars=1: 5.7 seconds > global_vars=1, loop_context_vars=1: 13.0 seconds !!! > > So here is my question: Is this behavior normal ? Yes. HTML::Template global_vars are very inefficient. -- Alex Kapranoff, $n=["1another7Perl213Just3hacker49"=~/\d|\D*/g]; $$n[0]={grep/\d/,@$n};print"@$n{1..4}\n" |