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

awy has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to build a version of perl 5.10 that will have as small a memory footprint (both code and data) as possible. I want to run an existing perl application with a small memory budget. The application uses quite a bit of perl and CPAN stuff and typically has a memory footprint in the range 60-120MB on common platforms.

So far I have built perl with the following (possibly relevant) configure arguments:

config_arg18='-Ubincompat5005' config_arg19='-Ud_dosuid' config_arg20='-Ui_db' config_arg21='-Ui_gdbm' config_arg22='-Ui_ndbm' config_arg23='-Uuse64bitall' config_arg24='-Uuse64bitint' config_arg25='-Uuseithreads' config_arg26='-Uuselargefiles' config_arg27='-Uuselongdouble' config_arg28='-Uusemorebits' config_arg29='-Uuseshrplib' config_arg30='-Uusethreads'
Are there any other simple suggestions?

Or not so simple ones? I'd be prepared to go as far as modifying perl internals if it is likely to be useful.

I found the following: oplines - make perl runtime 8% faster and smaller; Does anyone know if this made it into 5.10? I would guess not, given the date of the messages.

Finally (for now) are there any generic tips for perl code to reduce the size of the in-memory (compiled) size? These could be general patterns, or processing techniques that one might apply when building the deployable application.