Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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

by ajt (Prior)
on Sep 06, 2002 at 12:32 UTC ( #195623=note: print w/replies, xml ) Need Help??

in reply to Re: Re: General questions on optimizing Perl performance
in thread General questions on optimizing Perl performance

Assuming you have mod_Perl available, which is alas mostly not the case, if you have written your scripts well, you can more or less make them run in "PerlRun" mode, which will run many CGI scripts more or less unmodified under mod_Perl, and deliver a measureable performance boost by avoiding all that forking.

Ideally you want to create Apache::Registry scripts, where you can write normal Perl, and have Apache/mod_Perl compile and cache it for you. You have to make sure you have written good code, as any problems will bring down the whole web server - and the fear of this is an oft quoted reason why most hosting companies won't offer mod_Perl.

To get the most out of mod_Perl you'd skip the CGI emulation of the above aproaches, and write pure Perl directly into Apache, which is very cool, and not for the feint of heart.

I don't claim to be a mod_Perl expert, so I'm sure some other more learned monks can offer additional advice. I'd have a look here for a start though:

Update: Extra links added.

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://195623]
[Your Mother]: Stick with what you know. Or post a SOPW and if it's not complicated I guarantee someone will answer; me if it's straightforward and no one else gets it better first.
[1nickt]: ++YourMother (Grammar Vigilante of Bristol)
[Lady_Aleena]: Um, how does grep do multiline? print "$file:$_" if grep { /get_(array|hash| data)\(.+\)/ } $_; only returns the same 18 lines the command line grep does.
[Lady_Aleena]: my scratchpad has what I have so far.
[choroba]: what do you mean by multiline?
[Discipulus]: thanks 1nickt!
[choroba]: grep is a filter, it selects elements from a list based on a boolean condition
[moritz]: you need to read the file in one go to do a multiline regex match
[erix]: ha ha, I like the Vigilante
[Lady_Aleena]: Forget it. I'm getting angry with it.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (12)
As of 2017-05-23 19:49 GMT
Find Nodes?
    Voting Booth?