I'm thinking a lot about switching from cgi to mod_perl - I'm beginning to write a lot more complex web applications and I think that mod_perl is the way to go. But before I take the plunge - it seems like it's going to be a task to get everything together and do the conversions - I need to know a couple of things:

1) Are there benchmarks out there for mod_cgi vs. mod_perl speed/performance? What about when a large part of the work is db queries? In other words, I'm looking for concrete guidance on when (in terms of script complexity and loading times for dynamic pages) it makes sense to take the plunge.

2) I'm working on a fairly big db project - and it's something designed for release. I'd want it to be able to be used in either a cgi or mod_perl context - are there a lot of things I'll have to think about? Release two different versions? I have read the coding guidelines on perl.apache.org - so I'm not looking for details, but the general strategies people have used when releasing perl code for web applications.

Thanks in advance!


In reply to mod_perl vs CGI: benchmarks and code by michellem

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.