Subject: | CPAN module too memory intensive |
I use CPAN.pm on a current Debian installation on a slow older machine
without a whole lot of memory,
and the step in its operation following the outputting of
Going to write /root/.cpan/Metadata
takes a real long time. the "top" utility tells me that the process
is using over 38M of memory.
Would it be possible to alter CPAN so it takes less memory by throwing
out intermediate variables earlier, or storing more in the FS rather than
in memory?
Are there installation / configuration options that I should know about,
to optimize my site for little memory, much disk space?
(i think a configuration option would make more sense than a CPAN-LOWMEM.pm
fork.)
Maybe indexing could be moved server-side, instead of downloading
and parsing the whole index whenever I want to use the CPAN module to
"streamline" installing a single module (which is usually how I use it.)
Maybe "CPANcache" daemons could take care of the indexing, and CPAN
would be configured to use a CPANcache daemon if available. PM groups
could run CPANcache daemons. I know mine would at least.
...
Storable->nstore($cache) might be taking a long time, or it might be
whatever comes after that.
I wonder if the cache was kept on disk in smaller grains, if that
would help. (perhaps using DirDB or a variant that could effectively
nstore the various CPAN objects, instead of punting the whole issue
to Storable.)
Another place where CPAN shell appears to hang is on exiting, after
"lockfile removed" we don't appear to exit.
It's still more convenient than running ftp, gunzip, Make, yadda yadda.
thanks