See this for more specifics.

6 MB is not much. If it were 6 MB per process, it would be a problem, but it is 6 MB for 30 (!) processes, so that is 0.2 MB per process. If you can't live with that, you should probably use C, not Perl. 6 MB of RAM costs approximately US$ 0.85. Compare that to time spent on fully qualifying symbols in distant packages.

Besides that, CGI.pm exports an excessive amount of symbols (158 for :standard).

And I really do not understand why people who care about efficiency this much, using micro optimizations all over the place, use functions to generate HTML (or if they don't, why they import a bunch of symbols that they never use). As if optrees don't use memory. As if calling a function has no runtime overhead.

To all CGI.pm users out there: if you care about memory usage and run speed, don't use CGI.pm. Don't waste your time by doing silly benchmarks and calculations that focus on a mere 20 kB per script per process while CGI.pm itself uses 950 kB (of which not everything stays shared), and you have runtime function call overhead for HTML tags.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }


In reply to Re: Re: Re: Re^2: Pragma (more) like Java's 'import'? (importing and mod_perl) by Juerd
in thread Pragma (more) like Java's 'import'? by djantzen

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.