I'm curious, did any of that help? I can't imagine it shaved more than a few hundred k. And a lot of that "saving" would be in shared libs that are probably already in memory.

You're not giving us a lot of details to work with here, but here's a few random suggestions. First, turn off caching - lots of modules support caching data and you don't want them to do that if memory is scarce. Second, switch to straight CGI if you're using mod_perl - mod_perl is fast because it keeps your app in memory, but you don't want that. CGI will immediately release all memory used by a script as soon as it returns results. Finally, look critically at which modules are being used and make sure you really need them. Having a Project::All module with use statements for all your CPAN modules is very convenient but it will kill your memory usage if you're running a script that only needs a few deps.

If you want more useful advice you'll have to give us more information - what does the app do, what CPAN modules does it use, does it leak memory, etc.

-sam


In reply to Re: Building a small perl by samtregar
in thread Building a small perl by awy

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.