Yes, you can make globals things global, so you don't do things you don't need to do in the subs, or reserve memory . For example, you don't read in every function the config file, normally you load/read the configuration once on begin, and store it in a global var and all read from it

Mm, don't know the complexity of the solution, but normally one tends to do packages and so, that you don't have one large script, instead something modular...

I think you are using DB, right?

The thing is that once the interpretar has reserve X size of system mem, it don't give it back to the system, instead it's available for the interpreter... as far as I know.

Is the application a script or is it a handler? Have you thought about using something like http://maypole.perl.org or http://catalyst.perl.org?


In reply to Re^5: 2 Questions on Images and Mod_perl mem usage by fmerges
in thread 2 Questions on Images and Mod_perl mem usage 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.