in reply to Optimizing a web application for the best performance
You're thinking about memory use, at least in a mod_perl environment, incorrectly. What you should do is preload all of the modules you use in a startup.pl, in a <Perl> section, or if you really like typing a lot with PerlModule directives in your httpd.conf.
This loads the module into the server at startup and then can share the memory used by the module with all of the Apache children, and thus your CGIs and mod_perl handlers.
So for example say My::Foo module uses up 200k of memory. If you simply use My::Foo; in your programs then you will use 200k per Apache child process. However, if you preload it then you will use 200k in total no matter how many children are currently in use.
NOTE: This isn't a perfect representation, as you are only sharing the module's code itself and not any of the data structures it creates at run time. But this is how you should be thinking about it.