There are several threads here on how to use a module conditionally and the consequences of the different ways to do that. Check out the replies to Checking to see if a particular Module is installed and error message if module doesn't exist? (the latter one doesn't go into as much detail but does have some new ideas not mentioned in the first thread).
You can certainly reduce memory use by not loading modules that you will not be using. Also, if you have a very big module that you only use a few routines of, then you might want to patch the module to use autoloading so that start-up time and memory consumption are reduced.
Yes, you can "unuse" a module but that won't return the memory to the operating system on most operating systems, including Win32 (it makes the memory available for Perl to reuse for other things, though). Note that pages of memory that aren't actively being used will only consume swap space, not real memory, so you might just want to add more swap space if you are running low on that.
- tye (but my friends call me "Tye")In reply to (tye)Re: Modules and memory use
by tye
in thread Modules and memory use
by randomblue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |