All good questions:

1. Database accesses do slow down a script, DBI has a lot of overhead. You can increase your performance with a database specific driver (i.e. one written using the database api) but you'll loose portability.

2. In my opinion the slight overhead that modules incur is well worth the maintainability of the code, machine performance wise might not be the best solution, but manpower performance wise it is definitely worth it to use modules.

3. Apache and mod_perl cache perl modules, whether or not they are user created, a module is just a module. I beleive that scripts are even cached if they are run under Apache::Registry

4. OO code is usually a bit slower than procedural. I tend to make small scripts procedural and larger projects OO, although it sometimes just makes sense for the small scripts also.

5. Straight HTML is faster. Any other combinations you should benchmark yourself (since there are just way too many ways to combine perl and SSI to give a straight answer). If you run apache use ab, it's a great tool to help you figure out what is happening.

Other notes. use the Benchmark module and Devel::DProf to see what really effects the performance of your scripts and ab (apache benchmark) for your web comparisons.

HTH

In reply to Re: Perl CGI and SSI speed by steveAZ98
in thread Perl CGI and SSI speed by legLess

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.