in reply to Increase efficiency of script

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