Subject: | Module::Pluggable has a large overhead |
One of the main goals of the Perl Email Project, working in the Email:: namepsace, is to be small, tight and modular to as great a degree as possible.
After encountering some dependency bugs, the first complete dependency mapping of Email:: has been completed, to help identify some of the areas which are causing Email:: to bloat out unnescesarily.
See this URL before we continue
http://pep.kwiki.org/index.cgi?ProjectBloat
Looking at the area at the right, you can see the problem. While Module::Pluggable was great for doing Email::Abstract (and potentially converting over Email::Send as well) it is introducing quite a bit of bloat.
Namely 5 additional non-core packages and 1200k of memory load overhead.
Most of the memory bloat comes from File::Find::Rule, which I notice you don't use very heavily, just a very simple name('*.pm') query. The other one, UNIVERSAL::require seems to just provide some syntactic sugar.
To help make it easier to spread the use of Module::Pluggable, and to help with out bloat problem, it would be great if we could cut away these external dependencies.
Which would mean replacing the use of the 1100k File::Find::Rule with a small precompiled 20-50k &wanted function, and replacing UNIVERSAL::require with normal eval { require ... } stuff.
I know it's a little uglier, but I think it would be great to have Module::Pluggable with no non-core dependencies at all. It would make it much easier to use and distribute/bundle.
If you are amenable, I'd be happy to write the initial patch for it. For and questions, talk to myself (Alias) or cwest on irc.perl.org #perl.