So here's what I did: to take out the internet access timing from the equation, I set up a local apache server on my windows box using indigoperl (indigostar.com), which sets up mod_perl by default (although I tried this with and without mod_perl).

I then combined my modules together in one big script and ran the above timing test against my local server, comparing the original script (with 13 modules) to the combined single script. The single script, btw, was 4,200 lines and 114kb).

The results: The single script average response time was 0.86 seconds, while the module-base script was 0.97 seconds. Strangely, mod_perl enabled didn't varied only about 1-2% from the non mod_perl response time.

So this is about a 10-15% increase in speed, which was more significant than I thought it would be, but still probably not worth the trouble, at least not right now...

alan


In reply to Re: CGI speed: one script versus many modules by Anonymous Monk
in thread CGI speed: one script versus many modules by alanraetz

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.