jonnyfolk,

As others have commented on here, it sounds likely that the problem may be with download or rendering time. If the problem is with download time, it may be possible to use a module like CGI::Compress::Gzip or making your own with one of the gzip compression libraries on CPAN in addition to checking and setting the correct output headers. Compressing the content of a text file should in most cases dramatically reduce the download time.

On the other hand, if the performance problem is with rendering, you may want to consider making the returned html merely point to links to download the content, and then specify a "Content-disposition: attachment" in the CGI to prompt the user with a open/save dialog box. If the user is able to save the text file on their computer and use an external program to open it, it will cut out the time for slow browser rendering.

Thanks,
techy


In reply to Re: Increase efficiency of script by techy
in thread Increase efficiency of script by jonnyfolk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.