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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.