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:
Are there any other simple suggestions?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'
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Building a small perl
by zentara (Archbishop) on Mar 20, 2009 at 14:48 UTC | |
by awy (Acolyte) on Mar 20, 2009 at 16:08 UTC | |
Re: Building a small perl
by jethro (Monsignor) on Mar 20, 2009 at 13:01 UTC | |
Re: Building a small perl
by sundialsvc4 (Abbot) on Mar 20, 2009 at 12:42 UTC | |
Re: Building a small perl
by samtregar (Abbot) on Mar 20, 2009 at 21:40 UTC | |
by awy (Acolyte) on Mar 21, 2009 at 19:47 UTC | |
by syphilis (Archbishop) on Mar 21, 2009 at 23:09 UTC | |
Re: Building a small perl
by Animator (Hermit) on Mar 20, 2009 at 17:55 UTC |
Back to
Seekers of Perl Wisdom