alw has asked for the wisdom of the Perl Monks concerning the following question:
I create an array @rows, with over 1000 lines of on the fly table rows. Each element of @rows is created with:
push @rows,Tr(td([$cell1,$cell2,....$cell6]));
If I then use the table function to output to a filehandle:
print FH table(@rows)
the in core script memory usage jumps to over 120 mbytes. If I use the the following:
print FH '<TABLE>',@rows,'</TABLE>';
the in core usage is about 20 mbytes. I found the same behaviour using the div function. I have only tried this on winXP, but the speed and resources saved by doing it without the fuction call is significant. Has anyone seen this, and if so was there a solution?
20060906 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI.pm table function memory usage
by Fletch (Bishop) on Sep 06, 2006 at 20:17 UTC | |
|
Re: CGI.pm table function memory usage
by mreece (Friar) on Sep 06, 2006 at 20:57 UTC | |
by isotope (Deacon) on Sep 06, 2006 at 22:19 UTC | |
|
Re: CGI.pm table function memory usage
by DrWhy (Chaplain) on Sep 06, 2006 at 20:16 UTC | |
|
Re: CGI.pm table function memory usage
by alw (Sexton) on Sep 06, 2006 at 20:34 UTC |