in reply to Re: General questions on optimizing Perl performance
in thread [untitled node, ID 195604]

Replies are listed 'Best First'.
Re: Re: Re: General questions on optimizing Perl performance
by perrin (Chancellor) on Sep 06, 2002 at 14:28 UTC
    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.

Re: Re: Re: General questions on optimizing Perl performance
by dantie (Initiate) on Sep 06, 2002 at 12:58 UTC
    Hi,

    as Mike said, main problem is the launch of the Perl Binary itself. Moving over to mod_perl can save _lots_ of CPU ("System") time. Beside that, Parsing only one time will save CPU ("User") time too, of course.

    lg,
    daniel