* Jose Luis Martinez <[email protected]> [2009-02-18 15:35]:
> I tend to use Module::Load to load seldom used modules at
> runtime to reduce loading time and memory footprint.

This is counterproductive in a long-running, fork()ing server.

If you load all modules up front then they will only be loaded
once and each child processes will have a copy already loaded at
the time of fork(), which also means child processes will start
out sharing more memory with the parent (and therefore probably
with other children).

If you load the modules as late as possible, then each child
process will have to load the module separately and will not
share the necessary memory with any other process.

But you can use prefork.pm[1] to have your cake and eat it.

[1]: http://search.cpan.org/dist/prefork/

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to