[ic] Strange behavior when using CGI values as loop list elements

Marty Tennison marty at dripdepot.com
Wed Feb 25 20:52:11 UTC 2009

Perl 5.8.8 and 5.10.0 (both threaded and non-threaded tested)
IC 5.6.1
Apache 2.x using mod_perl2 (not tested with vlink or tlink)
Mysql 5.0.67
Hi All,

I've been banging my head on this one for a few days. 

When I use CGI values as elements in a loop list, I'm seeing an extreme
slowdown. (orders of magnitude)  I've tried this on the demo site but
unfortunately the benchmark tag is not available on the demo site.  So
I'm not sure if this is reproducible on the demo or not.  I apologize if
it is not but I'm wondering if what I am seeing is specific to my setup
or not.  If anyone would like to test this, here is are the  steps.

1) Create a test page (see contents below)
2) Call the test page like this....   
3) Check out the benchmark times (you'll need the benchmark tag for this)
<p>Loop using cgi variable
[benchmark start=1]
[loop list="[cgi looplist]"]
Elapsed time: [benchmark]</p>


[tmp looplist]1[/tmp]
<p>Loop using scratch variable
[benchmark start=1]
[loop list="[scratch looplist]"]
Elapsed time: [benchmark]</p>


[value name=looplist set="1" hide=1]
<p>Loop using value variable
[benchmark start=1]
[loop list="[value looplist]"]
Elapsed time: [benchmark]</p>

 --- END TEST PAGE ----


Loop using cgi variable 1 Elapsed time: 0.030

Loop using scratch variable 1 Elapsed time: 0.000

Loop using value variable 1 Elapsed time: 0.000

-  - -- ----  ---------------------------- --- -- -   -
Marty Tennison                     DripDepot.com
email: marty at dripdepot.com
web: www.dripdepot.com
phone: +1-888-525-8874 x102
fax: +1-866-686-6719
-  -- --- --------------------------------------- --- --

More information about the interchange-users mailing list