shemp has asked for the wisdom of the Perl Monks concerning the following question:
$records is an array of hashrefs of strings, nothing special. The inne loop contains only the one print statement, and that is where the slowdown occurs. If i add the following line, like so:... foreach my $field (sort @$field_order) { print "\t<TR>\n"; print "\t\t<TH ALIGN=RIGHT>$field :</TH>\n"; for my $i (0 .. $num_recs) { print "\t\t<TD ALIGN=LEFT>$records->[$i]->{$field}</TD>\n" +; } print "\t</TR>\n"; }
then this script runs fast.... # heres the new line of code $records->[$i]->{$field} .= ""; print "\t\t<TD ALIGN=LEFT>$records->[$i]->{$field}</TD>\n"; ...
and they all are reasonable. I have also taken refs to various parts of this data structure, and looked at it with Data::Dumper, and nothing unusual appears.length($records->[$i]->{$field})
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Program slows dramatically!
by Abigail-II (Bishop) on May 28, 2003 at 23:33 UTC | |
by shemp (Deacon) on May 29, 2003 at 15:51 UTC | |
|
Re: Program slows dramatically!
by nite_man (Deacon) on May 29, 2003 at 06:43 UTC | |
|
Re: Program slows dramatically!
by BrowserUk (Patriarch) on May 28, 2003 at 23:57 UTC | |
by shemp (Deacon) on May 29, 2003 at 15:13 UTC | |
by BrowserUk (Patriarch) on May 29, 2003 at 15:52 UTC |