[cgiapp] Model design in C::A/Titanium

Michael Peters mpeters at plusthree.com
Tue Sep 23 16:09:10 EDT 2008


Joshua Miller wrote:

> Using autoloader to only require in the subclasses when needed will also
> keep memory usage down, as rarely used modules won't get loaded unless
> they're actually called.

Are you running under normal CGI (do people still do that?).

If not, and you're running on a "good" OS (one with copy-on-write memory) and you're using a forking 
environment (mod_perl, or most FastCGI implementations) you should pre-load all of you modules up 
front. This will actually decrease memory usage. Or course if you have a really, really rarely used 
module that is really, really big you might reconsider this advice. Unless I'm missing something?

-- 
Michael Peters
Plus Three, LP



More information about the cgiapp mailing list