Does module size matter under mod_perl?

Assuming you have sufficient memory to stay out of swap, no, module size doesn't have any direct relationship with performance.

There are typically two performance considerations with languages such as Perl. Upon startup, Perl code is compiled to bytecode and then interpreted and executed. Loosely speaking there is a compiletime stage, and a runtime stage. The first consideration is compile time. This can be an issue for applications that start up frequently such as plain old CGI. And for such applications, minimizing start-up time by sticking to lightweight, concise modules has some benefit. But it is not relevant to a mod_perl application because start-up happens only once in awhile.

The other performance consideration is runtime performance. There is no direct correlation between a module's size and its runtime performance.

So go ahead and re-factor if it makes sense to do so for some other reason such as project scalability, simplification of maintenance, or improved modularity / code-reuse. Just don't expect for it to have any effect on runtime efficiency, unless algorithms are improved in the process.


Dave


In reply to Re: Does module size matter under mod_perl? by davido
in thread Does module size matter under mod_perl? by Anonymous Monk

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.