in reply to [untitled node, ID 195614]
in thread [untitled node, ID 195604]

You can do a lot of damage in 92 lines. For example, even a very small database query is usually heavier than anything else in a Perl script, and opening a database connection takes time. Using a persistent environment like mod_perl takes care of the connection problem, and some caching could help with general performance.

If you don't have access to mod_perl, you could try to convince your web host to let you run some other things. Options include FastCGI, CGI::SpeedyCGI, and PPerl. You should also learn to use Devel::DProf, which will tell you where your script is spending its time.

  • Comment on Re: Re: Re: General questions on optimizing Perl performance