http://qs321.pair.com?node_id=752156


in reply to Building a small perl

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