Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of nicholas (3034)

Friday June 05, 2009
04:57 AM

Devel::NYTProf for the win.

[ #39077 ]

So, with about 2 minutes investigation, Devel::NYTProf reveals that this will halve the time of my regression test for a work module:

use Memoize;
memoize 'Config::Any::plugins';

Sadly it won't work out for me whether that's the right thing to do, or whether there's a more correct fix to solve the real underlying problem.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Hah, that's interesting

    Yes, AFAIK Module::Pluggable doesn't cache its results, to each time you call ->plugins it will rescan the hierarchy

    Usually people only load a config at startup once, so it's not typically a problem

    In Config::Any:

    { my (@plugins, $loaded); sub plugins { return @plugins if $loaded; $loaded = 1; return @plugins = $finder->plugins } }

    • Usually people only load a config at startup once, so it's not typically a problem

      I am interested in startup times too, and we're using lots of little config files - hence this problem. I guess we're "special". :-)