Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Beginner's luck with mod_perl

by technojosh (Priest)
on Jun 12, 2008 at 14:56 UTC ( #691669=perlmeditation: print w/replies, xml ) Need Help??

So I have been using perl at work for about 4 years now. My level is definately novice. Use it for quite a few things, but one of them always was an internal website.

I learned perl through no formal method, and basically had taken over a large group of cgi-bin perl stuff. The internal site, has, in the last year or so, started housing and displaying a very large amount of content. The code has basically been nothing but maintained by me over the years, with a few features thrown in here and there for whatever reason. As the site's complexity grew, it had been getting very slow (some pages were taking upwards of 4/5 seconds to load)

Now, to the point of this meditation...

It is no surprise that when researching around the web about perl/cgi scripts, one often gets referred to mod_perl. About a week ago i decided to figure out what it was all about and see if it would work for the aforementioned site.

How do you quantify something that installs so easy (I was able to use PPM to install it), and immediately returns such a gain in performance? I feel like i was living in the dark ages running stuff in cgi. After adjusting some of the code to work in a mod_perl environment, the site is running so fast there's barely a load time for any of the pages, and the others at work who use it (non-perl weirdos, geez) are amazed at the gains in performance.

That is all, just a perl/mod_perl success story for my fellow monks

Replies are listed 'Best First'.
Re: Beginner's luck with mod_perl
by BrowserUk (Pope) on Jun 12, 2008 at 15:12 UTC
      hehe, believe me I'd LOVE to throw bigger/better/faster hardware at it ;)

      still though, from a budget/manager's perspective, i'd think mine would rather hear that i just installed module (for free) and it took me 15 minutes, as opposed to getting a Purchase Order from me for a new server machine...(oh how i have tried though!)

        i'd think mine would rather hear that i just installed module (for free) and it took me 15 minutes

        You never say that! You say that wrote it from scratch based upon some theories you read on the internet. It will take you a week to implement but will double performance. That will give you time to play WOW without them bothering you in the mean time... :)

      If you had some in the first place!

      I found a similar thing myself, and was amazed at the difference in "page loading" it was just like a hanging brake had been freed off.

Re: Beginner's luck with mod_perl
by perrin (Chancellor) on Jun 12, 2008 at 16:09 UTC
    Great success story! Welcome to mod_perl, and feel free to join us on the mod_perl mailing list any time.
      I especially like perrin's contributions to the prevelance of mod_perl thread about FastCGI.

      After reading his posts in that thread I started using FastCGI with CGI::Fast and must say I love it.

      The hardest thing about mod_perl, I find, is debugging. At least with CGI::Fast I can run a script like an ordinary CGI script from the command line in debug mode.

        I didn't mean to imply with that post that people who want to write CGI-compatible scripts should avoid mod_perl. Any script you write that runs under CGI and FastCGI should work under mod_perl without modifications.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://691669]
Approved by Corion
Front-paged by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2018-02-18 18:49 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (256 votes). Check out past polls.