http://www.perlmonks.org?node_id=1118174


in reply to Re^7: Any gotchas with CGI and Mouse running together?
in thread Any gotchas with CGI and Mouse running together?

Sounds like trolling ... :/

But let's take it positive, and try to make an insightful post worth linking to.

short

Your Mother already convinced me that startup time wouldn't improve much and I'm not a M* user anyway.

So why don't you bench it? :)

long

FWIW some theory for those interested:

The famous "startup time using Moose" actually consists of at least 3 phases, cause in reality Moose is used in every single class involved ¹:

  1. Compilation:

    require of Moose.pm at first use Moose;

  2. Exporting:

    calling Moose->import() for each use Moose;

  3. Application:

    calling exported Moose::subs() sugar like has in each class during their use Class;

Naturally pre-compilation (like "perlcc Moose") can only effect phase 1, which is a one-time advantage.

But YM already pointed out that startup time grows significantly with the number of classes.

conclusion

If you or anyone else is interested in benchmarking it, I'd suggest taking Schwern's test scenario and extend it appropriately to identify these phases.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)

PS: Je suis Charlie!

¹) so what people actually mean is the resulting start up time of modules/classes build with Moose.

update

Of course one could try to benchmark the application of classes created with Moose, i.e. mainly creating objects and calling methods.

But that's not startup time anymore, and hearsay is that runtime is fast enough.