When talking about SSI, it helps to distinguish between using #include, which doesn't spawn additional processes, and #exec, which does. The performance difference is significant. (This sounds kind of "well, duh!", but some web servers don't support #exec.)

If all you're doing is including new fragments at page assembly time, mod_perl and SSI should be equivalent. A lot of systems rely on "dynamically" assemblying from static content that is periodically regenerated. Things get tricker when the content has be assembled on the spot.

If you would be using SSI #exec to prepare dynamic content at page assembly time, then mod_perl is going to be faster (by virtue of not having to start a new processes).

If you're not able to use mod_perl, then you need to start counting process starts to predict whether SSI or CGI will be faster. In the case of including static content, SSI is going to win, since #include doesn't involve starting any new processes. Beyond that, and all other factors being equal*, then it comes down to counting process starts. A CGI that can assemble content without having to fork subprocesses is liable to beat out an SSI that assembles content using 2 or more #exec's.


* Other factors include maintainability of separate scripts, separation of static and dynamic content, ability of a designer to edit HTML (vs. forcing them to become programmers), etc.


In reply to Re: SSI v dynamic pages by dws
in thread SSI v dynamic pages by cLive ;-)

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.